/*
               File: Curso
        Description: Curso
             Author: GeneXus C# Generator version 10_1_5-42940
       Generated on: 10/24/2011 10:3:58.56
       Program type: Callable routine
          Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using System.Data;
using System.Data.SqlClient;
using GeneXus.Data;
using com.genexus;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.WebControls;
using GeneXus.Http;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using System.Xml.Serialization;
using System.Data.SqlTypes;
namespace GeneXus.Programs {
   public class curso : GXDataArea, System.Web.SessionState.IRequiresSessionState
   {
      protected void INITENV( )
      {
         if ( GxWebError != 0 )
         {
            return  ;
         }
      }

      protected void INITTRN( )
      {
         initialize_properties( ) ;
         entryPointCalled = false ;
         gxfirstwebparm = GetNextPar( ) ;
         gxfirstwebparm_bkp = gxfirstwebparm ;
         gxfirstwebparm = DecryptAjaxCall( gxfirstwebparm, "High") ;
         if ( StringUtil.StrCmp(gxfirstwebparm, "dyncall") == 0 )
         {
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            dyncall( GetNextPar( )) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_6") == 0 )
         {
            A25CursoId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_6( A25CursoId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_8") == 0 )
         {
            A18ProfesorId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_8( A18ProfesorId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_10") == 0 )
         {
            A15MateriaId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_10( A15MateriaId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_11") == 0 )
         {
            A18ProfesorId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
            A15MateriaId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_11( A18ProfesorId, A15MateriaId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxExecAct_"+"gxLoad_13") == 0 )
         {
            A1AlumnoId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxLoad_13( A1AlumnoId) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxEvt") == 0 )
         {
            setAjaxEventMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxfirstwebparm = GetNextPar( ) ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxNewRow_"+"Gridcurso_profesores_materias") == 0 )
         {
            nRC_Gridcurso_profesores_materias = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            nGXsfl_95_idx = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            sGXsfl_95_idx = GetNextPar( ) ;
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxnrGridcurso_profesores_materias_newrow( nRC_Gridcurso_profesores_materias, nGXsfl_95_idx, sGXsfl_95_idx) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxNewRow_"+"Grid1") == 0 )
         {
            nRC_Grid1 = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            nGXsfl_65_idx = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            sGXsfl_65_idx = GetNextPar( ) ;
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxnrGrid1_newrow( nRC_Grid1, nGXsfl_65_idx, sGXsfl_65_idx) ;
            return  ;
         }
         else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxNewRow_"+"Gridcurso_alumnos") == 0 )
         {
            nRC_Gridcurso_alumnos = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            nGXsfl_104_idx = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
            sGXsfl_104_idx = GetNextPar( ) ;
            setAjaxCallMode();
            if ( ! IsValidAjaxCall( true) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxnrGridcurso_alumnos_newrow( nRC_Gridcurso_alumnos, nGXsfl_104_idx, sGXsfl_104_idx) ;
            return  ;
         }
         else
         {
            if ( ! IsValidAjaxCall( false) )
            {
               GxWebError = 1 ;
               return  ;
            }
            gxfirstwebparm = gxfirstwebparm_bkp ;
         }
         if ( ! entryPointCalled )
         {
            Gx_mode = gxfirstwebparm ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            if ( StringUtil.StrCmp(gxfirstwebparm, "viewer") != 0 )
            {
               AV7CursoId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV7CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV7CursoId), 4, 0)));
            }
         }
         Form.Meta.addItem("Generator", "GeneXus C#", 0) ;
         Form.Meta.addItem("Version", "10_1_5-42940", 0) ;
         Form.Meta.addItem("Description", "Curso", 0) ;
         context.wjLoc = "" ;
         context.nUserReturn = 0 ;
         context.wbHandled = 0 ;
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
         }
         GX_FocusControl = edtCursoNombre_Internalname ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         wbErr = false ;
         context.SetTheme("Classic");
      }

      public curso( )
      {
         context = new GxContext(  );
         DataStoreUtil.LoadDataStores( context);
         dsDefault = context.GetDataStore("Default") ;
         IsMain = true;
         context.SetTheme("Classic");
      }

      public curso( IGxContext context )
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public void release( )
      {
      }

      public void execute( String aP0_Gx_mode ,
                           short aP1_CursoId )
      {
         this.Gx_mode = aP0_Gx_mode;
         this.AV7CursoId = aP1_CursoId;
         executePrivate();
      }

      void executePrivate( )
      {
         isStatic = false;
         webExecute();
      }

      protected override void createObjects( )
      {
      }

      public override void webExecute( )
      {
         if ( initialized == 0 )
         {
            createObjects();
            initialize();
         }
         INITENV( ) ;
         INITTRN( ) ;
         if ( ( GxWebError == 0 ) && ! isAjaxCallMode( ) )
         {
            MasterPageObj = (GXMasterPage) ClassLoader.GetInstance("appmasterpage", "GeneXus.Programs.appmasterpage", new Object[] {new GxContext( context.handle, context.DataStores, context.HttpContext)});
            MasterPageObj.setDataArea(this,false);
            MasterPageObj.webExecute();
            if ( context.isAjaxRequest( ) )
            {
               enableOutput();
               if ( ! context.isAjaxRequest( ) )
               {
                  context.GX_webresponse.AppendHeader("Cache-Control", "max-age=0");
               }
               if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) )
               {
                  context.GX_webresponse.AddString((String)(context.getJSONResponse( )));
               }
               else
               {
                  context.Redirect( context.wjLoc );
                  context.DispatchAjaxCommands();
               }
            }
         }
         this.cleanup();
      }

      protected void Draw( )
      {
         if ( context.isAjaxRequest( ) )
         {
            disableOutput();
         }
         if ( ! GxWebStd.gx_redirect( context) )
         {
            disable_std_buttons( ) ;
            enableDisable( ) ;
            set_caption( ) ;
            /* Form start */
            wb_table1_2_046( true) ;
         }
         return  ;
      }

      protected void wb_table1_2_046e( bool wbgen )
      {
         if ( wbgen )
         {
         }
         /* Execute Exit event if defined. */
      }

      protected void wb_table1_2_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTablemain_Internalname, tblTablemain_Internalname, "", "TableBorder100x100", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            wb_table2_5_046( true) ;
         }
         return  ;
      }

      protected void wb_table2_5_046e( bool wbgen )
      {
         if ( wbgen )
         {
            /* Control Group */
            ClassString = "Group" ;
            StyleString = "" ;
            context.WriteHtmlText( "<fieldset id=\""+grpGroupdata_Internalname+"\""+" style=\"-moz-border-radius:3pt;\""+" class=\""+ClassString+"\">") ;
            context.WriteHtmlText( "<legend class=\""+ClassString+"Title"+"\">"+"Curso"+"</legend>") ;
            wb_table3_27_046( true) ;
         }
         return  ;
      }

      protected void wb_table3_27_046e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</fieldset>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table1_2_046e( true) ;
         }
         else
         {
            wb_table1_2_046e( false) ;
         }
      }

      protected void wb_table3_27_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable1_Internalname, tblTable1_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            ClassString = "ErrorViewer" ;
            StyleString = "" ;
            GxWebStd.gx_msg_list( context, "", context.GX_msglist.DisplayMode, StyleString, ClassString, "", "false");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            wb_table4_33_046( true) ;
         }
         return  ;
      }

      protected void wb_table4_33_046e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 111,'',false,'',0)\"" ;
            ClassString = "BtnEnter" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, context.GetButtonType( ), bttBtn_enter_Internalname, "Confirmar", "Confirmar", "", StyleString, ClassString, bttBtn_enter_Visible, 1, "rounded", 5, bttBtn_enter_Jsonclick, "EENTER.", TempTags, "", "", "HLP_Curso.htm");
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 112,'',false,'',0)\"" ;
            ClassString = "BtnCancel" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, context.GetButtonType( ), bttBtn_cancel_Internalname, "Cancelar", "Cancelar", "", StyleString, ClassString, bttBtn_cancel_Visible, 1, "rounded", 1, bttBtn_cancel_Jsonclick, "ECANCEL.", TempTags, "", "", "HLP_Curso.htm");
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 113,'',false,'',0)\"" ;
            ClassString = "BtnDelete" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, context.GetButtonType( ), bttBtn_delete_Internalname, "Eliminar", "Eliminar", "", StyleString, ClassString, bttBtn_delete_Visible, 0, "rounded", 5, bttBtn_delete_Jsonclick, "EDELETE.", TempTags, "", "", "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table3_27_046e( true) ;
         }
         else
         {
            wb_table3_27_046e( false) ;
         }
      }

      protected void wb_table4_33_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable2_Internalname, tblTable2_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td valign=\"top\" class=\"td5\" >") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockcursoid_Internalname, 1, 1, 0, "Id", "", "", "", 0, lblTextblockcursoid_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtCursoId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A25CursoId), 4, 0, ",", "")), "", 4, "chr", 1, "row", 4, 1, edtCursoId_Enabled, 0, 0, 0, "", "", StyleString, ClassString, "", context.localUtil.Format( (decimal)(A25CursoId), "ZZZ9"), "", 0, edtCursoId_Jsonclick, "", 0, 1, -1, true, "right", "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td valign=\"top\" class=\"td5\" >") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockcursonombre_Internalname, 1, 1, 0, "Nombre", "", "", "", 0, lblTextblockcursonombre_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 43,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtCursoNombre_Internalname, StringUtil.RTrim( A26CursoNombre), "", 5, "chr", 1, "row", 5, 1, edtCursoNombre_Enabled, 0, 0, 0, "", "", StyleString, ClassString, "", StringUtil.RTrim( context.localUtil.Format( A26CursoNombre, "")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(43);\"", 0, edtCursoNombre_Jsonclick, "", 0, 1, -1, true, "left", "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td valign=\"top\" class=\"td5\" >") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockcursonumeroalumnos_Internalname, 1, 1, 0, "Numero Alumnos", "", "", "", 0, lblTextblockcursonumeroalumnos_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtCursoNumeroAlumnos_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A27CursoNumeroAlumnos), 4, 0, ",", "")), "", 4, "chr", 1, "row", 4, 1, edtCursoNumeroAlumnos_Enabled, 0, 0, 0, "", "", StyleString, ClassString, "", context.localUtil.Format( (decimal)(A27CursoNumeroAlumnos), "ZZZ9"), "", 0, edtCursoNumeroAlumnos_Jsonclick, "", 0, 1, -1, true, "right", "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td valign=\"top\" class=\"td5\" >") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockcursoaula_Internalname, 1, 1, 0, "Aula", "", "", "", 0, lblTextblockcursoaula_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 53,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtCursoAula_Internalname, StringUtil.RTrim( A28CursoAula), "", 20, "chr", 1, "row", 20, 1, edtCursoAula_Enabled, 0, 0, 0, "", "", StyleString, ClassString, "", StringUtil.RTrim( context.localUtil.Format( A28CursoAula, "")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(53);\"", 0, edtCursoAula_Jsonclick, "", 0, 1, -1, true, "left", "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td valign=\"top\" class=\"td5\" >") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockcursodescripcion_Internalname, 1, 1, 0, "Descripcion", "", "", "", 0, lblTextblockcursodescripcion_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Multiple line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 58,'',false,'',0)\"" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            ClassString = "Attribute" ;
            StyleString = "" ;
            GxWebStd.gx_html_textarea( context, edtCursoDescripcion_Internalname, StringUtil.RTrim( A29CursoDescripcion), 1, edtCursoDescripcion_Enabled, 0, 80, "chr", 9, "row", StyleString, ClassString, "650", TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(58);\"", -1, 0, "", "", true, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td colspan=\"2\" >") ;
            context.WriteHtmlText( "<br>") ;
            wb_table5_61_046( true) ;
         }
         return  ;
      }

      protected void wb_table5_61_046e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "<hr class=\"HRDefault\">") ;
            /*  Grid Control  */
            Grid1Container.AddObjectProperty("GridName", "Grid1");
            Grid1Container.AddObjectProperty("Class", StringUtil.RTrim( "FreeStyleGrid"));
            Grid1Container.AddObjectProperty("Borderwidth", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
            Grid1Container.AddObjectProperty("Rules", StringUtil.RTrim( "none"));
            Grid1Container.AddObjectProperty("Class", "FreeStyleGrid");
            Grid1Container.AddObjectProperty("Cellpadding", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
            Grid1Container.AddObjectProperty("Cellspacing", StringUtil.LTrim( StringUtil.NToC( (decimal)(2), 4, 0, ".", "")));
            Grid1Container.AddObjectProperty("Backcolorstyle", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Backcolorstyle), 1, 0, ".", "")));
            Grid1Container.AddObjectProperty("Borderwidth", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Borderwidth), 4, 0, ".", "")));
            Grid1Container.AddObjectProperty("CmpContext", "");
            Grid1Container.AddObjectProperty("InMasterPage", "false");
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", lblTextblockprofesorid_Caption);
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A18ProfesorId), 4, 0, ".", "")));
            Grid1Column.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorId_Enabled), 5, 0, ".", "")));
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", context.convertURL( "prompt.gif"));
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", lblTextblockprofesorapellidos_Caption);
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A19ProfesorApellidos));
            Grid1Column.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorApellidos_Enabled), 5, 0, ".", "")));
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", lblTextblockprofesornombre_Caption);
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A20ProfesorNombre));
            Grid1Column.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombre_Enabled), 5, 0, ".", "")));
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", lblTextblockprofesornombrecompleto_Caption);
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A21ProfesorNombreCompleto));
            Grid1Column.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0, ".", "")));
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Grid1Column.AddObjectProperty("Value", lblTitlematerias_Caption);
            Grid1Container.AddColumnProperties(Grid1Column);
            Grid1Container.AddObjectProperty("Allowselection", "true");
            Grid1Container.AddObjectProperty("Selectioncolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Selectioncolor), 9, 0, ".", "")));
            Grid1Container.AddObjectProperty("Allowhover", "true");
            Grid1Container.AddObjectProperty("Hovercolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Hoveringcolor), 9, 0, ".", "")));
            Grid1Container.AddObjectProperty("Allowcollapsing", "false");
            Grid1Container.AddObjectProperty("Collapsed", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Collapsed), 9, 0, ".", "")));
            /* Save parent mode. */
            sMode7 = Gx_mode ;
            nGXsfl_65_idx = 0 ;
            if ( ( nKeyPressed == 1 ) && ( AnyError == 0 ) )
            {
               /* Enter key processing. */
               nBlankRcdCount7 = 0 ;
               if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
               {
                  /* Display confirmed (stored) records */
                  nRcdExists_7 = 1 ;
                  ScanStart047( ) ;
                  while ( RcdFound7 != 0 )
                  {
                     init_level_properties7( ) ;
                     getByPrimaryKey047( ) ;
                     AddRow047( ) ;
                     ScanNext047( ) ;
                  }
                  ScanEnd047( ) ;
                  nBlankRcdCount7 = 0 ;
               }
            }
            else if ( ( nKeyPressed == 3 ) || ( nKeyPressed == 4 ) || ( ( nKeyPressed == 1 ) && ( AnyError != 0 ) ) )
            {
               /* Button check  or addlines. */
               standaloneNotModal047( ) ;
               standaloneModal047( ) ;
               sMode7 = Gx_mode ;
               while ( nGXsfl_65_idx < nRC_Grid1 )
               {
                  ReadRow047( ) ;
                  edtProfesorId_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORID_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
                  edtProfesorApellidos_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORAPELLIDOS_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorApellidos_Enabled), 5, 0)));
                  edtProfesorNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORNOMBRE_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombre_Enabled), 5, 0)));
                  edtProfesorNombreCompleto_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0)));
                  imgprompt_15_Link = cgiGet( "PROMPT_18_"+sGXsfl_65_idx+"Link") ;
                  if ( ( nRcdExists_7 == 0 ) && ( StringUtil.StrCmp(Gx_mode, "INS") != 0 ) )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     standaloneModal047( ) ;
                  }
                  SendRow047( ) ;
               }
               Gx_mode = sMode7 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            else
            {
               /* Get or get-alike key processing. */
               nBlankRcdCount7 = 0 ;
               nRcdExists_7 = 1 ;
               ScanStart047( ) ;
               while ( RcdFound7 != 0 )
               {
                  init_level_properties7( ) ;
                  getByPrimaryKey047( ) ;
                  standaloneNotModal047( ) ;
                  standaloneModal047( ) ;
                  AddRow047( ) ;
                  ScanNext047( ) ;
               }
               ScanEnd047( ) ;
            }
            /* Initialize fields for 'new' records and send them. */
            if ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 )
            {
               sMode7 = Gx_mode ;
               Gx_mode = "INS" ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
               InitAll047( ) ;
               init_level_properties7( ) ;
               standaloneNotModal047( ) ;
               standaloneModal047( ) ;
               nRcdExists_7 = 0 ;
               nIsMod_7 = 0 ;
               nBlankRcdCount7 = (short)(nBlankRcdUsr7+nBlankRcdCount7) ;
               fRowAdded = 0 ;
               while ( nBlankRcdCount7 > 0 )
               {
                  AddRow047( ) ;
                  if ( ( nKeyPressed == 4 ) && ( fRowAdded == 0 ) )
                  {
                     fRowAdded = 1 ;
                     GX_FocusControl = edtProfesorId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
                  nBlankRcdCount7 = (short)(nBlankRcdCount7-1) ;
               }
               Gx_mode = sMode7 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            /* Restore parent mode. */
            Gx_mode = sMode7 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            sStyleString = " style=\"display:none;\"" ;
            sStyleString = "" ;
            context.WriteHtmlText( "<div id=\""+"Grid1Container"+"Div\" "+sStyleString+">"+"</div>") ;
            context.httpAjaxContext.ajax_rsp_assign_grid("_"+"Grid1", (Object)(Grid1Container));
            GxWebStd.gx_hidden_field( context, "Grid1ContainerData", Grid1Container.ToJavascriptSource());
            if ( context.isAjaxRequest( ) )
            {
               GxWebStd.gx_hidden_field( context, "Grid1ContainerData"+"V", Grid1Container.GridValuesHidden());
            }
            else
            {
               context.WriteHtmlText( "<input type=\"hidden\" "+"name=\""+"Grid1ContainerData"+"V"+"\" value='"+Grid1Container.GridValuesHidden()+"'>") ;
            }
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td colspan=\"2\" >") ;
            context.WriteHtmlText( "<br>") ;
            wb_table6_100_046( true) ;
         }
         return  ;
      }

      protected void wb_table6_100_046e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "<hr class=\"HRDefault\">") ;
            /*  Grid Control  */
            Gridcurso_alumnosContainer.AddObjectProperty("GridName", "Gridcurso_alumnos");
            Gridcurso_alumnosContainer.AddObjectProperty("Class", "Grid");
            Gridcurso_alumnosContainer.AddObjectProperty("Cellpadding", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
            Gridcurso_alumnosContainer.AddObjectProperty("Cellspacing", StringUtil.LTrim( StringUtil.NToC( (decimal)(2), 4, 0, ".", "")));
            Gridcurso_alumnosContainer.AddObjectProperty("Backcolorstyle", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridcurso_alumnos_Backcolorstyle), 1, 0, ".", "")));
            Gridcurso_alumnosContainer.AddObjectProperty("CmpContext", "");
            Gridcurso_alumnosContainer.AddObjectProperty("InMasterPage", "false");
            Gridcurso_alumnosColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridcurso_alumnosColumn.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A1AlumnoId), 4, 0, ".", "")));
            Gridcurso_alumnosColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoId_Enabled), 5, 0, ".", "")));
            Gridcurso_alumnosContainer.AddColumnProperties(Gridcurso_alumnosColumn);
            Gridcurso_alumnosColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridcurso_alumnosContainer.AddColumnProperties(Gridcurso_alumnosColumn);
            Gridcurso_alumnosColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridcurso_alumnosColumn.AddObjectProperty("Value", StringUtil.RTrim( A2AlumnoNombre));
            Gridcurso_alumnosColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombre_Enabled), 5, 0, ".", "")));
            Gridcurso_alumnosContainer.AddColumnProperties(Gridcurso_alumnosColumn);
            Gridcurso_alumnosColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridcurso_alumnosColumn.AddObjectProperty("Value", StringUtil.RTrim( A3AlumnoApellidos));
            Gridcurso_alumnosColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoApellidos_Enabled), 5, 0, ".", "")));
            Gridcurso_alumnosContainer.AddColumnProperties(Gridcurso_alumnosColumn);
            Gridcurso_alumnosColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
            Gridcurso_alumnosColumn.AddObjectProperty("Value", StringUtil.RTrim( A4AlumnoNombreCompleto));
            Gridcurso_alumnosColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0, ".", "")));
            Gridcurso_alumnosContainer.AddColumnProperties(Gridcurso_alumnosColumn);
            Gridcurso_alumnosContainer.AddObjectProperty("Allowselection", "false");
            Gridcurso_alumnosContainer.AddObjectProperty("Allowcollapsing", "false");
            Gridcurso_alumnosContainer.AddObjectProperty("Collapsed", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridcurso_alumnos_Collapsed), 9, 0, ".", "")));
            nGXsfl_104_idx = 0 ;
            if ( ( nKeyPressed == 1 ) && ( AnyError == 0 ) )
            {
               /* Enter key processing. */
               nBlankRcdCount9 = 5 ;
               if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
               {
                  /* Display confirmed (stored) records */
                  nRcdExists_9 = 1 ;
                  ScanStart049( ) ;
                  while ( RcdFound9 != 0 )
                  {
                     init_level_properties9( ) ;
                     getByPrimaryKey049( ) ;
                     AddRow049( ) ;
                     ScanNext049( ) ;
                  }
                  ScanEnd049( ) ;
                  nBlankRcdCount9 = 5 ;
               }
            }
            else if ( ( nKeyPressed == 3 ) || ( nKeyPressed == 4 ) || ( ( nKeyPressed == 1 ) && ( AnyError != 0 ) ) )
            {
               /* Button check  or addlines. */
               standaloneNotModal049( ) ;
               standaloneModal049( ) ;
               sMode9 = Gx_mode ;
               while ( nGXsfl_104_idx < nRC_Gridcurso_alumnos )
               {
                  ReadRow049( ) ;
                  edtAlumnoId_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNOID_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
                  edtAlumnoNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNONOMBRE_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombre_Enabled), 5, 0)));
                  edtAlumnoApellidos_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNOAPELLIDOS_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoApellidos_Enabled), 5, 0)));
                  edtAlumnoNombreCompleto_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0)));
                  imgprompt_15_Link = cgiGet( "PROMPT_1_"+sGXsfl_104_idx+"Link") ;
                  if ( ( nRcdExists_9 == 0 ) && ( StringUtil.StrCmp(Gx_mode, "INS") != 0 ) )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     standaloneModal049( ) ;
                  }
                  SendRow049( ) ;
               }
               Gx_mode = sMode9 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            else
            {
               /* Get or get-alike key processing. */
               nBlankRcdCount9 = 5 ;
               nRcdExists_9 = 1 ;
               ScanStart049( ) ;
               while ( RcdFound9 != 0 )
               {
                  init_level_properties9( ) ;
                  getByPrimaryKey049( ) ;
                  standaloneNotModal049( ) ;
                  standaloneModal049( ) ;
                  AddRow049( ) ;
                  ScanNext049( ) ;
               }
               ScanEnd049( ) ;
            }
            /* Initialize fields for 'new' records and send them. */
            if ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 )
            {
               sMode9 = Gx_mode ;
               Gx_mode = "INS" ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
               InitAll049( ) ;
               init_level_properties9( ) ;
               standaloneNotModal049( ) ;
               standaloneModal049( ) ;
               nRcdExists_9 = 0 ;
               nIsMod_9 = 0 ;
               nBlankRcdCount9 = (short)(nBlankRcdUsr9+nBlankRcdCount9) ;
               fRowAdded = 0 ;
               while ( nBlankRcdCount9 > 0 )
               {
                  AddRow049( ) ;
                  if ( ( nKeyPressed == 4 ) && ( fRowAdded == 0 ) )
                  {
                     fRowAdded = 1 ;
                     GX_FocusControl = edtAlumnoId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
                  nBlankRcdCount9 = (short)(nBlankRcdCount9-1) ;
               }
               Gx_mode = sMode9 ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            }
            sStyleString = " style=\"display:none;\"" ;
            sStyleString = "" ;
            context.WriteHtmlText( "<div id=\""+"Gridcurso_alumnosContainer"+"Div\" "+sStyleString+">"+"</div>") ;
            context.httpAjaxContext.ajax_rsp_assign_grid("_"+"Gridcurso_alumnos", (Object)(Gridcurso_alumnosContainer));
            GxWebStd.gx_hidden_field( context, "Gridcurso_alumnosContainerData", Gridcurso_alumnosContainer.ToJavascriptSource());
            if ( context.isAjaxRequest( ) )
            {
               GxWebStd.gx_hidden_field( context, "Gridcurso_alumnosContainerData"+"V", Gridcurso_alumnosContainer.GridValuesHidden());
            }
            else
            {
               context.WriteHtmlText( "<input type=\"hidden\" "+"name=\""+"Gridcurso_alumnosContainerData"+"V"+"\" value='"+Gridcurso_alumnosContainer.GridValuesHidden()+"'>") ;
            }
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table4_33_046e( true) ;
         }
         else
         {
            wb_table4_33_046e( false) ;
         }
      }

      protected void wb_table6_100_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable6_Internalname, tblTable6_Internalname, "", "Table95", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"SubTitle\" >") ;
            /* Text block */
            ClassString = "" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTitlealumnos_Internalname, 1, 1, 0, "Alumnos", "", "", "", 0, lblTitlealumnos_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table6_100_046e( true) ;
         }
         else
         {
            wb_table6_100_046e( false) ;
         }
      }

      protected void wb_table5_61_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTable3_Internalname, tblTable3_Internalname, "", "Table95", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td class=\"SubTitle\" >") ;
            /* Text block */
            ClassString = "" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTitleprofesores_Internalname, 1, 1, 0, "Profesores", "", "", "", 0, lblTitleprofesores_Jsonclick, "", StyleString, ClassString, "HLP_Curso.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table5_61_046e( true) ;
         }
         else
         {
            wb_table5_61_046e( false) ;
         }
      }

      protected void wb_table2_5_046( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTabletoolbar_Internalname, tblTabletoolbar_Internalname, "", "ViewTable", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            context.WriteHtmlText( "<div style=\"WHITE-SPACE: nowrap\" class=\"ToolbarMain\">") ;
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 8,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_first_Internalname, "", context.GetImagePath( "b9e06284-17ac-4c88-8937-5dbd84ad5d80", "", "Classic"), "Classic", imgBtn_first_Visible, 1, "", "Primero", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_first_Jsonclick, "EFIRST.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 9,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_first_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_first_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_first_separator_Jsonclick, "EFIRST.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 10,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_previous_Internalname, "", context.GetImagePath( "7d212604-db7b-4785-9c0d-5faffe71aa33", "", "Classic"), "Classic", imgBtn_previous_Visible, 1, "", "Anterior", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_previous_Jsonclick, "EPREVIOUS.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 11,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_previous_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_previous_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_previous_separator_Jsonclick, "EPREVIOUS.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 12,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_next_Internalname, "", context.GetImagePath( "1ae947cf-1354-41a9-8d59-d91daebf554f", "", "Classic"), "Classic", imgBtn_next_Visible, 1, "", "Siguiente", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_next_Jsonclick, "ENEXT.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 13,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_next_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_next_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_next_separator_Jsonclick, "ENEXT.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 14,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_last_Internalname, "", context.GetImagePath( "29211874-e613-48e5-9011-8017d984217e", "", "Classic"), "Classic", imgBtn_last_Visible, 1, "", "Ultimo", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_last_Jsonclick, "ELAST.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 15,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_last_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_last_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_last_separator_Jsonclick, "ELAST.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 16,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_select_Internalname, "", context.GetImagePath( "1ca03f75-9947-4d2c-90a4-e8ab9c5cedea", "", "Classic"), "Classic", imgBtn_select_Visible, 1, "", "Seleccionar", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_select_Jsonclick, "ESELECT.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 17,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_select_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_select_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_select_separator_Jsonclick, "ESELECT.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 18,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_enter2_Internalname, "", context.GetImagePath( "2061cf2c-bd33-4433-a13e-34af954142e9", "", "Classic"), "Classic", imgBtn_enter2_Visible, imgBtn_enter2_Enabled, "", "Confirmar", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_enter2_Jsonclick, "EENTER.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 19,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_enter2_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_enter2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_enter2_separator_Jsonclick, "EENTER.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 20,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_cancel2_Internalname, "", context.GetImagePath( "0e94ced8-bc34-47ff-9a53-bc683736a686", "", "Classic"), "Classic", imgBtn_cancel2_Visible, 1, "", "Cancelar", 0, 0, 0, "", 0, "", 0, 0, "", "", 1, imgBtn_cancel2_Jsonclick, "ECANCEL.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 21,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_cancel2_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_cancel2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 1, imgBtn_cancel2_separator_Jsonclick, "ECANCEL.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 22,'',false,'',0)\"" ;
            ClassString = "ImageHandCenter" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_delete2_Internalname, "", context.GetImagePath( "7695fe89-52c9-4b7e-871e-0e11548f823e", "", "Classic"), "Classic", imgBtn_delete2_Visible, imgBtn_delete2_Enabled, "", "Eliminar", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_delete2_Jsonclick, "EDELETE.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            /* Active images/pictures */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 23,'',false,'',0)\"" ;
            ClassString = "ImageTop" ;
            StyleString = "" ;
            GxWebStd.gx_bitmap( context, imgBtn_delete2_separator_Internalname, "", context.GetImagePath( "ea7811ba-4fa2-42da-8591-e6cb10669f1f", "", "Classic"), "Classic", imgBtn_delete2_separator_Visible, 1, "", "", 0, 0, 0, "", 0, "", 0, 0, "", "", 5, imgBtn_delete2_separator_Jsonclick, "EDELETE.", StyleString, ClassString, "", ""+TempTags, "", "", "HLP_Curso.htm");
            context.WriteHtmlText( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table2_5_046e( true) ;
         }
         else
         {
            wb_table2_5_046e( false) ;
         }
      }

      protected void UserMain( )
      {
         standaloneStartup( ) ;
      }

      protected void standaloneStartup( )
      {
         standaloneStartupServer( ) ;
         disable_std_buttons( ) ;
         enableDisable( ) ;
         Process( ) ;
      }

      protected void standaloneStartupServer( )
      {
         /* Execute Start event if defined. */
         context.wbGlbDoneStart = 0 ;
         /* Execute user event: E11042 */
         E11042 ();
         context.wbGlbDoneStart = 1 ;
         assign_properties_default( ) ;
         if ( AnyError == 0 )
         {
            if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
            {
               /* Read saved SDTs. */
               /* Read variables values. */
               A25CursoId = (short)(context.localUtil.CToN( cgiGet( edtCursoId_Internalname), ",", ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
               A26CursoNombre = cgiGet( edtCursoNombre_Internalname) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A26CursoNombre", A26CursoNombre);
               A27CursoNumeroAlumnos = (short)(context.localUtil.CToN( cgiGet( edtCursoNumeroAlumnos_Internalname), ",", ".")) ;
               n27CursoNumeroAlumnos = false ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
               A28CursoAula = cgiGet( edtCursoAula_Internalname) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A28CursoAula", A28CursoAula);
               A29CursoDescripcion = cgiGet( edtCursoDescripcion_Internalname) ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A29CursoDescripcion", A29CursoDescripcion);
               /* Read saved values. */
               Z25CursoId = (short)(context.localUtil.CToN( cgiGet( "Z25CursoId"), ",", ".")) ;
               Z26CursoNombre = cgiGet( "Z26CursoNombre") ;
               Z28CursoAula = cgiGet( "Z28CursoAula") ;
               Z29CursoDescripcion = cgiGet( "Z29CursoDescripcion") ;
               IsConfirmed = (short)(context.localUtil.CToN( cgiGet( "IsConfirmed"), ",", ".")) ;
               IsModified = (short)(context.localUtil.CToN( cgiGet( "IsModified"), ",", ".")) ;
               Gx_mode = cgiGet( "Mode") ;
               nRC_Grid1 = (short)(context.localUtil.CToN( cgiGet( "nRC_Grid1"), ",", ".")) ;
               nRC_Gridcurso_alumnos = (short)(context.localUtil.CToN( cgiGet( "nRC_Gridcurso_alumnos"), ",", ".")) ;
               AV7CursoId = (short)(context.localUtil.CToN( cgiGet( "vCURSOID"), ",", ".")) ;
               AV12Pgmname = cgiGet( "vPGMNAME") ;
               Gx_mode = cgiGet( "vMODE") ;
               /* Read subfile selected row values. */
               /* Read hidden variables. */
               standaloneNotModal( ) ;
            }
            else
            {
               standaloneNotModal( ) ;
               if ( StringUtil.StrCmp(gxfirstwebparm, "viewer") == 0 )
               {
                  Gx_mode = "DSP" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  A25CursoId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
                  getEqualNoModal( ) ;
                  Gx_mode = "DSP" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  disable_std_buttons( ) ;
                  standaloneModal( ) ;
               }
               else
               {
                  if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
                  {
                     sMode6 = Gx_mode ;
                     Gx_mode = "UPD" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Gx_mode = sMode6 ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  }
                  standaloneModal( ) ;
                  if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
                  {
                     getByPrimaryKey( ) ;
                     if ( RcdFound6 == 1 )
                     {
                        if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
                        {
                           /* Confirm record */
                           CONFIRM_040( ) ;
                           if ( AnyError == 0 )
                           {
                              GX_FocusControl = bttBtn_enter_Internalname ;
                              context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noinsert"), 1, "CURSOID");
                        AnyError = 1 ;
                     }
                  }
               }
            }
         }
      }

      protected void Process( )
      {
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
            /* Read Transaction buttons. */
            sEvt = cgiGet( "_EventName") ;
            EvtGridId = cgiGet( "_EventGridId") ;
            EvtRowId = cgiGet( "_EventRowId") ;
            if ( StringUtil.Len( sEvt) > 0 )
            {
               sEvtType = StringUtil.Left( sEvt, 1) ;
               sEvt = StringUtil.Right( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
               /* Check if conditions changed and reset current page numbers */
               /* Check if conditions changed and reset current page numbers */
               if ( StringUtil.StrCmp(sEvtType, "M") != 0 )
               {
                  if ( StringUtil.StrCmp(sEvtType, "E") == 0 )
                  {
                     sEvtType = StringUtil.Right( sEvt, 1) ;
                     if ( StringUtil.StrCmp(sEvtType, ".") == 0 )
                     {
                        sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
                        if ( StringUtil.StrCmp(sEvt, "START") == 0 )
                        {
                           context.wbHandled = 1 ;
                           dynload_actions( ) ;
                           /* Execute user event: E11042 */
                           E11042 ();
                        }
                        else if ( StringUtil.StrCmp(sEvt, "AFTER TRN") == 0 )
                        {
                           context.wbHandled = 1 ;
                           dynload_actions( ) ;
                           /* Execute user event: E12042 */
                           E12042 ();
                        }
                        else if ( StringUtil.StrCmp(sEvt, "ENTER") == 0 )
                        {
                           context.wbHandled = 1 ;
                           btn_enter( ) ;
                           /* No code required for Cancel button. It is implemented as the Reset button. */
                        }
                        else if ( StringUtil.StrCmp(sEvt, "FIRST") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "PREVIOUS") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "NEXT") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "LAST") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "SELECT") == 0 )
                        {
                           context.wbHandled = 1 ;
                        }
                        else if ( StringUtil.StrCmp(sEvt, "DELETE") == 0 )
                        {
                           context.wbHandled = 1 ;
                           btn_delete( ) ;
                        }
                     }
                     else
                     {
                        sEvtType = StringUtil.Right( sEvt, 4) ;
                        sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-4)) ;
                     }
                  }
                  context.wbHandled = 1 ;
               }
            }
         }
      }

      protected void AfterTrn( )
      {
         if ( trnEnded == 1 )
         {
            /* Execute user event: E12042 */
            E12042 ();
            trnEnded = 0 ;
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 )  )
            {
               /* Clear variables for new insertion. */
               InitAll046( ) ;
               standaloneNotModal( ) ;
               standaloneModal( ) ;
            }
         }
      }

      public override String ToString( )
      {
         return "" ;
      }

      public GxContentInfo GetContentInfo( )
      {
         return (GxContentInfo)(null) ;
      }

      protected void disable_std_buttons( )
      {
         imgBtn_delete2_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Visible), 5, 0)));
         imgBtn_delete2_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_separator_Visible), 5, 0)));
         bttBtn_delete_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_delete_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_delete_Visible), 5, 0)));
         imgBtn_first_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_first_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_first_Visible), 5, 0)));
         imgBtn_first_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_first_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_first_separator_Visible), 5, 0)));
         imgBtn_previous_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_previous_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_previous_Visible), 5, 0)));
         imgBtn_previous_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_previous_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_previous_separator_Visible), 5, 0)));
         imgBtn_next_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_next_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_next_Visible), 5, 0)));
         imgBtn_next_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_next_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_next_separator_Visible), 5, 0)));
         imgBtn_last_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_last_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_last_Visible), 5, 0)));
         imgBtn_last_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_last_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_last_separator_Visible), 5, 0)));
         imgBtn_select_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_select_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_select_Visible), 5, 0)));
         imgBtn_select_separator_Visible = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_select_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_select_separator_Visible), 5, 0)));
         if ( ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
         {
            imgBtn_delete2_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Visible), 5, 0)));
            imgBtn_delete2_separator_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_separator_Visible), 5, 0)));
            bttBtn_delete_Visible = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_delete_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_delete_Visible), 5, 0)));
            if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
            {
               imgBtn_enter2_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Visible), 5, 0)));
               imgBtn_enter2_separator_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_separator_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_separator_Visible), 5, 0)));
               bttBtn_enter_Visible = 0 ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, bttBtn_enter_Internalname, "Visible", StringUtil.LTrim( StringUtil.Str( (decimal)(bttBtn_enter_Visible), 5, 0)));
            }
            edtCursoId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoId_Enabled), 5, 0)));
            edtCursoNombre_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoNombre_Enabled), 5, 0)));
            edtCursoNumeroAlumnos_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoNumeroAlumnos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoNumeroAlumnos_Enabled), 5, 0)));
            edtCursoAula_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoAula_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoAula_Enabled), 5, 0)));
            edtCursoDescripcion_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoDescripcion_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoDescripcion_Enabled), 5, 0)));
            edtProfesorId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
            edtProfesorApellidos_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorApellidos_Enabled), 5, 0)));
            edtProfesorNombre_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombre_Enabled), 5, 0)));
            edtProfesorNombreCompleto_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0)));
            edtMateriaId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
            edtMateriaNombre_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaNombre_Enabled), 5, 0)));
            edtAlumnoId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
            edtAlumnoNombre_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombre_Enabled), 5, 0)));
            edtAlumnoApellidos_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoApellidos_Enabled), 5, 0)));
            edtAlumnoNombreCompleto_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0)));
         }
      }

      protected void set_caption( )
      {
         if ( ( IsConfirmed == 1 ) && ( AnyError == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_confdelete"), 0, "");
            }
            else
            {
               GX_msglist.addItem(context.GetMessage( "GXM_mustconfirm"), 0, "");
            }
         }
      }

      protected void CONFIRM_040( )
      {
         BeforeValidate046( ) ;
         if ( AnyError == 0 )
         {
            if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               OnDeleteControls046( ) ;
            }
            else
            {
               CheckExtendedTable046( ) ;
               CloseExtendedTableCursors046( ) ;
            }
         }
         if ( AnyError == 0 )
         {
            /* Save parent mode. */
            sMode6 = Gx_mode ;
            CONFIRM_047( ) ;
            if ( AnyError == 0 )
            {
               CONFIRM_049( ) ;
               if ( AnyError == 0 )
               {
                  /* Restore parent mode. */
                  Gx_mode = sMode6 ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  IsConfirmed = 1 ;
               }
            }
            /* Restore parent mode. */
            Gx_mode = sMode6 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
      }

      protected void CONFIRM_049( )
      {
         nGXsfl_104_idx = 0 ;
         while ( nGXsfl_104_idx < nRC_Gridcurso_alumnos )
         {
            ReadRow049( ) ;
            if ( ( nRcdExists_9 != 0 ) || ( nIsMod_9 != 0 ) )
            {
               GetKey049( ) ;
               if ( ( nRcdExists_9 == 0 ) && ( nRcdDeleted_9 == 0 ) )
               {
                  if ( RcdFound9 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     BeforeValidate049( ) ;
                     if ( AnyError == 0 )
                     {
                        CheckExtendedTable049( ) ;
                        CloseExtendedTableCursors049( ) ;
                        if ( AnyError == 0 )
                        {
                           IsConfirmed = 1 ;
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtAlumnoId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound9 != 0 )
                  {
                     if ( nRcdDeleted_9 != 0 )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        getByPrimaryKey049( ) ;
                        Load049( ) ;
                        BeforeValidate049( ) ;
                        if ( AnyError == 0 )
                        {
                           OnDeleteControls049( ) ;
                        }
                     }
                     else
                     {
                        if ( nIsMod_9 != 0 )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           BeforeValidate049( ) ;
                           if ( AnyError == 0 )
                           {
                              CheckExtendedTable049( ) ;
                              CloseExtendedTableCursors049( ) ;
                              if ( AnyError == 0 )
                              {
                                 IsConfirmed = 1 ;
                              }
                           }
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_9 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtAlumnoId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtAlumnoId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A1AlumnoId), 4, 0, ",", ""))) ;
            ChangePostValue( edtAlumnoNombre_Internalname, StringUtil.RTrim( A2AlumnoNombre)) ;
            ChangePostValue( edtAlumnoApellidos_Internalname, StringUtil.RTrim( A3AlumnoApellidos)) ;
            ChangePostValue( edtAlumnoNombreCompleto_Internalname, StringUtil.RTrim( A4AlumnoNombreCompleto)) ;
            ChangePostValue( "ZT_"+"Z1AlumnoId_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z1AlumnoId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_9), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_9), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_9), 4, 0, ",", ""))) ;
            if ( nIsMod_9 != 0 )
            {
               ChangePostValue( "ALUMNOID_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNONOMBRE_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombre_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNOAPELLIDOS_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoApellidos_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* Using cursor T00046 */
         pr_default.execute(3, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(3) != 101) )
         {
            A27CursoNumeroAlumnos = T00046_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T00046_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         }
         /* End of After( level) rules */
      }

      protected void CONFIRM_048( )
      {
         nGXsfl_95_idx = 0 ;
         while ( nGXsfl_95_idx < nRC_Gridcurso_profesores_materias )
         {
            ReadRow048( ) ;
            if ( ( nRcdExists_8 != 0 ) || ( nIsMod_8 != 0 ) )
            {
               GetKey048( ) ;
               if ( ( nRcdExists_8 == 0 ) && ( nRcdDeleted_8 == 0 ) )
               {
                  if ( RcdFound8 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     BeforeValidate048( ) ;
                     if ( AnyError == 0 )
                     {
                        CheckExtendedTable048( ) ;
                        CloseExtendedTableCursors048( ) ;
                        if ( AnyError == 0 )
                        {
                           IsConfirmed = 1 ;
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtProfesorId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound8 != 0 )
                  {
                     if ( nRcdDeleted_8 != 0 )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        getByPrimaryKey048( ) ;
                        Load048( ) ;
                        BeforeValidate048( ) ;
                        if ( AnyError == 0 )
                        {
                           OnDeleteControls048( ) ;
                        }
                     }
                     else
                     {
                        if ( nIsMod_8 != 0 )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           BeforeValidate048( ) ;
                           if ( AnyError == 0 )
                           {
                              CheckExtendedTable048( ) ;
                              CloseExtendedTableCursors048( ) ;
                              if ( AnyError == 0 )
                              {
                                 IsConfirmed = 1 ;
                              }
                           }
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_8 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtProfesorId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtMateriaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A15MateriaId), 4, 0, ",", ""))) ;
            ChangePostValue( edtMateriaNombre_Internalname, StringUtil.RTrim( A16MateriaNombre)) ;
            ChangePostValue( "ZT_"+"Z15MateriaId_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z15MateriaId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_8), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_8), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_8), 4, 0, ",", ""))) ;
            if ( nIsMod_8 != 0 )
            {
               ChangePostValue( "MATERIAID_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "MATERIANOMBRE_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaNombre_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
      }

      protected void CONFIRM_047( )
      {
         nGXsfl_65_idx = 0 ;
         while ( nGXsfl_65_idx < nRC_Grid1 )
         {
            ReadRow047( ) ;
            if ( ( nRcdExists_7 != 0 ) || ( nIsMod_7 != 0 ) )
            {
               GetKey047( ) ;
               if ( ( nRcdExists_7 == 0 ) && ( nRcdDeleted_7 == 0 ) )
               {
                  if ( RcdFound7 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     BeforeValidate047( ) ;
                     if ( AnyError == 0 )
                     {
                        CheckExtendedTable047( ) ;
                        CloseExtendedTableCursors047( ) ;
                        if ( AnyError == 0 )
                        {
                           /* Save parent mode. */
                           sMode7 = Gx_mode ;
                           CONFIRM_048( ) ;
                           if ( AnyError == 0 )
                           {
                              /* Restore parent mode. */
                              Gx_mode = sMode7 ;
                              context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                              IsConfirmed = 1 ;
                           }
                           /* Restore parent mode. */
                           Gx_mode = sMode7 ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtProfesorId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound7 != 0 )
                  {
                     if ( nRcdDeleted_7 != 0 )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        getByPrimaryKey047( ) ;
                        Load047( ) ;
                        BeforeValidate047( ) ;
                        if ( AnyError == 0 )
                        {
                           OnDeleteControls047( ) ;
                        }
                     }
                     else
                     {
                        if ( nIsMod_7 != 0 )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           BeforeValidate047( ) ;
                           if ( AnyError == 0 )
                           {
                              CheckExtendedTable047( ) ;
                              CloseExtendedTableCursors047( ) ;
                              if ( AnyError == 0 )
                              {
                                 /* Save parent mode. */
                                 sMode7 = Gx_mode ;
                                 CONFIRM_048( ) ;
                                 if ( AnyError == 0 )
                                 {
                                    /* Restore parent mode. */
                                    Gx_mode = sMode7 ;
                                    context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                                    IsConfirmed = 1 ;
                                 }
                                 /* Restore parent mode. */
                                 Gx_mode = sMode7 ;
                                 context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                              }
                           }
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_7 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtProfesorId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtProfesorId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A18ProfesorId), 4, 0, ",", ""))) ;
            ChangePostValue( edtProfesorApellidos_Internalname, StringUtil.RTrim( A19ProfesorApellidos)) ;
            ChangePostValue( edtProfesorNombre_Internalname, StringUtil.RTrim( A20ProfesorNombre)) ;
            ChangePostValue( edtProfesorNombreCompleto_Internalname, StringUtil.RTrim( A21ProfesorNombreCompleto)) ;
            ChangePostValue( "ZT_"+"Z18ProfesorId_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z18ProfesorId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRC_Gridcurso_profesores_materias_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRC_Gridcurso_profesores_materias), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_7), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_7), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_7), 4, 0, ",", ""))) ;
            if ( nIsMod_7 != 0 )
            {
               ChangePostValue( "PROFESORID_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORAPELLIDOS_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorApellidos_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORNOMBRE_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombre_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
      }

      protected void ResetCaption040( )
      {
      }

      protected void E11042( )
      {
         /* Start Routine */
         new isauthorized(context ).execute(  AV12Pgmname, out  AV9IsAuthorized) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Pgmname", AV12Pgmname);
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV9IsAuthorized", StringUtil.BoolToStr( AV9IsAuthorized));
         if ( ! AV9IsAuthorized )
         {
            context.wjLoc = formatLink("notauthorized.aspx") + "?" + UrlEncode(StringUtil.RTrim(AV12Pgmname)) ;
         }
         AV10TrnContext.FromXml(AV11WebSession.Get("TrnContext"), "");
      }

      protected void E12042( )
      {
         /* After Trn Routine */
         if ( ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) && ! AV10TrnContext.gxTpr_Callerondelete )
         {
            context.wjLoc = formatLink("wwcurso.aspx")  ;
         }
         context.setWebReturnParms(new Object[] {});
         context.nUserReturn = 1 ;
         returnInSub = true;
         if (true) return;
      }

      protected void ZM046( short GX_JID )
      {
         if ( ( GX_JID == 5 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
               Z26CursoNombre = T000415_A26CursoNombre[0] ;
               Z28CursoAula = T000415_A28CursoAula[0] ;
               Z29CursoDescripcion = T000415_A29CursoDescripcion[0] ;
            }
            else
            {
               Z26CursoNombre = A26CursoNombre ;
               Z28CursoAula = A28CursoAula ;
               Z29CursoDescripcion = A29CursoDescripcion ;
            }
         }
         if ( GX_JID == -5 )
         {
            Z25CursoId = A25CursoId ;
            Z26CursoNombre = A26CursoNombre ;
            Z28CursoAula = A28CursoAula ;
            Z29CursoDescripcion = A29CursoDescripcion ;
            Z27CursoNumeroAlumnos = A27CursoNumeroAlumnos ;
         }
      }

      protected void standaloneNotModal( )
      {
         edtCursoId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoId_Enabled), 5, 0)));
         edtCursoId_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtCursoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtCursoId_Enabled), 5, 0)));
         imgBtn_delete2_Enabled = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_delete2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_delete2_Enabled), 5, 0)));
         if ( ! (0==AV7CursoId) )
         {
            A25CursoId = AV7CursoId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
         }
      }

      protected void standaloneModal( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "DSP") == 0 )
         {
            imgBtn_enter2_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Enabled), 5, 0)));
         }
         else
         {
            imgBtn_enter2_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, imgBtn_enter2_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(imgBtn_enter2_Enabled), 5, 0)));
         }
         if ( ( StringUtil.StrCmp(Gx_mode, "INS") == 0 ) && ( Gx_BScreen == 0 ) )
         {
            /* Using cursor T00046 */
            pr_default.execute(3, new Object[] {A25CursoId});
            if ( (pr_default.getStatus(3) != 101) )
            {
               A27CursoNumeroAlumnos = T00046_A27CursoNumeroAlumnos[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
               n27CursoNumeroAlumnos = T00046_n27CursoNumeroAlumnos[0] ;
            }
            else
            {
               A27CursoNumeroAlumnos = 0 ;
               n27CursoNumeroAlumnos = false ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            }
            pr_default.close(3);
         }
      }

      protected void Load046( )
      {
         /* Using cursor T000417 */
         pr_default.execute(13, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(13) != 101) )
         {
            RcdFound6 = 1 ;
            A26CursoNombre = T000417_A26CursoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A26CursoNombre", A26CursoNombre);
            A28CursoAula = T000417_A28CursoAula[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A28CursoAula", A28CursoAula);
            A29CursoDescripcion = T000417_A29CursoDescripcion[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A29CursoDescripcion", A29CursoDescripcion);
            A27CursoNumeroAlumnos = T000417_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T000417_n27CursoNumeroAlumnos[0] ;
            ZM046( -5) ;
         }
         pr_default.close(13);
         OnLoadActions046( ) ;
      }

      protected void OnLoadActions046( )
      {
         AV12Pgmname = "Curso" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Pgmname", AV12Pgmname);
         /* Using cursor T00046 */
         pr_default.execute(3, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(3) != 101) )
         {
            A27CursoNumeroAlumnos = T00046_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T00046_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         }
         pr_default.close(3);
      }

      protected void CheckExtendedTable046( )
      {
         Gx_BScreen = 1 ;
         standaloneModal( ) ;
         AV12Pgmname = "Curso" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Pgmname", AV12Pgmname);
         /* Using cursor T00046 */
         pr_default.execute(3, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(3) != 101) )
         {
            A27CursoNumeroAlumnos = T00046_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T00046_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         }
         pr_default.close(3);
      }

      protected void CloseExtendedTableCursors046( )
      {
         pr_default.close(3);
      }

      protected void enableDisable( )
      {
      }

      protected void gxLoad_6( short A25CursoId )
      {
         /* Using cursor T000419 */
         pr_default.execute(14, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(14) != 101) )
         {
            A27CursoNumeroAlumnos = T000419_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T000419_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.LTrim( StringUtil.NToC( (decimal)(A27CursoNumeroAlumnos), 4, 0, ".", "")))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(14) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(14);
      }

      protected void GetKey046( )
      {
         /* Using cursor T000420 */
         pr_default.execute(15, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(15) != 101) )
         {
            RcdFound6 = 1 ;
         }
         else
         {
            RcdFound6 = 0 ;
         }
         pr_default.close(15);
      }

      protected void getByPrimaryKey( )
      {
         /* Using cursor T000415 */
         pr_default.execute(12, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(12) != 101) )
         {
            ZM046( 5) ;
            RcdFound6 = 1 ;
            A25CursoId = T000415_A25CursoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
            A26CursoNombre = T000415_A26CursoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A26CursoNombre", A26CursoNombre);
            A28CursoAula = T000415_A28CursoAula[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A28CursoAula", A28CursoAula);
            A29CursoDescripcion = T000415_A29CursoDescripcion[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A29CursoDescripcion", A29CursoDescripcion);
            Z25CursoId = A25CursoId ;
            sMode6 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load046( ) ;
            Gx_mode = sMode6 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound6 = 0 ;
            InitializeNonKey046( ) ;
            sMode6 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal( ) ;
            Gx_mode = sMode6 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(12);
      }

      protected void getEqualNoModal( )
      {
         GetKey046( ) ;
         if ( RcdFound6 == 0 )
         {
         }
         else
         {
         }
         getByPrimaryKey( ) ;
      }

      protected void move_next( )
      {
         RcdFound6 = 0 ;
         /* Using cursor T000421 */
         pr_default.execute(16, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(16) != 101) )
         {
            while ( (pr_default.getStatus(16) != 101) && ( ( T000421_A25CursoId[0] < A25CursoId ) ) )
            {
               pr_default.readNext(16);
            }
            if ( (pr_default.getStatus(16) != 101) && ( ( T000421_A25CursoId[0] > A25CursoId ) ) )
            {
               A25CursoId = T000421_A25CursoId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
               RcdFound6 = 1 ;
            }
         }
         pr_default.close(12);
      }

      protected void move_previous( )
      {
         RcdFound6 = 0 ;
         /* Using cursor T000422 */
         pr_default.execute(17, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(17) != 101) )
         {
            while ( (pr_default.getStatus(17) != 101) && ( ( T000422_A25CursoId[0] > A25CursoId ) ) )
            {
               pr_default.readNext(17);
            }
            if ( (pr_default.getStatus(17) != 101) && ( ( T000422_A25CursoId[0] < A25CursoId ) ) )
            {
               A25CursoId = T000422_A25CursoId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
               RcdFound6 = 1 ;
            }
         }
         pr_default.close(11);
      }

      protected void btn_enter( )
      {
         nKeyPressed = 1 ;
         GetKey046( ) ;
         if ( RcdFound6 == 1 )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "CURSOID");
               AnyError = 1 ;
            }
            else if ( A25CursoId != Z25CursoId )
            {
               A25CursoId = Z25CursoId ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
               GX_msglist.addItem(context.GetMessage( "GXM_getbeforeupd"), "CandidateKeyNotFound", 1, "CURSOID");
               AnyError = 1 ;
            }
            else if ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 )
            {
               delete( ) ;
               AfterTrn( ) ;
               GX_FocusControl = edtCursoNombre_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
            else
            {
               /* Update record */
               Update046( ) ;
               GX_FocusControl = edtCursoNombre_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
         }
         else
         {
            if ( A25CursoId != Z25CursoId )
            {
               /* Insert record */
               Insert046( ) ;
               GX_FocusControl = edtCursoNombre_Internalname ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
            else
            {
               if ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 )
               {
                  GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "CURSOID");
                  AnyError = 1 ;
               }
               else
               {
                  /* Insert record */
                  Insert046( ) ;
                  GX_FocusControl = edtCursoNombre_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               }
            }
         }
         AfterTrn( ) ;
         if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
         {
            if ( AnyError == 0 )
            {
               context.nUserReturn = 1 ;
            }
         }
      }

      protected void btn_delete( )
      {
         if ( A25CursoId != Z25CursoId )
         {
            A25CursoId = Z25CursoId ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
            GX_msglist.addItem(context.GetMessage( "GXM_getbeforedlt"), 1, "CURSOID");
            AnyError = 1 ;
         }
         else
         {
            delete( ) ;
            AfterTrn( ) ;
            GX_FocusControl = edtCursoNombre_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError != 0 )
         {
         }
      }

      protected void CheckOptimisticConcurrency046( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T000423 */
            pr_default.execute(18, new Object[] {A25CursoId});
            if ( (pr_default.getStatus(18) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"Curso"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(18) == 101) || ( StringUtil.StrCmp(Z26CursoNombre, T000423_A26CursoNombre[0]) != 0 ) || ( StringUtil.StrCmp(Z28CursoAula, T000423_A28CursoAula[0]) != 0 ) || ( StringUtil.StrCmp(Z29CursoDescripcion, T000423_A29CursoDescripcion[0]) != 0 ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"Curso"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert046( )
      {
         BeforeValidate046( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable046( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM046( 0) ;
            CheckOptimisticConcurrency046( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm046( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert046( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000424 */
                     pr_default.execute(19, new Object[] {A26CursoNombre, A28CursoAula, A29CursoDescripcion});
                     pr_default.close(19);
                     /* Retrieving last key number assigned */
                     /* Using cursor T000425 */
                     pr_default.execute(20);
                     A25CursoId = T000425_A25CursoId[0] ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
                     pr_default.close(20);
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel046( ) ;
                           if ( AnyError == 0 )
                           {
                              /* Save values for previous() function. */
                              GX_msglist.addItem(context.GetMessage( "GXM_sucadded"), 0, "");
                              ResetCaption040( ) ;
                           }
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load046( ) ;
            }
            EndLevel046( ) ;
         }
         CloseExtendedTableCursors046( ) ;
      }

      protected void Update046( )
      {
         BeforeValidate046( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable046( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency046( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm046( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate046( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000426 */
                     pr_default.execute(21, new Object[] {A26CursoNombre, A28CursoAula, A29CursoDescripcion, A25CursoId});
                     pr_default.close(21);
                     if ( (pr_default.getStatus(21) == 103) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"Curso"}), "RecordIsLocked", 1, "");
                        AnyError = 1 ;
                     }
                     DeferredUpdate046( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel046( ) ;
                           if ( AnyError == 0 )
                           {
                              if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
                              {
                                 if ( AnyError == 0 )
                                 {
                                    context.nUserReturn = 1 ;
                                 }
                              }
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel046( ) ;
         }
         CloseExtendedTableCursors046( ) ;
      }

      protected void DeferredUpdate046( )
      {
      }

      protected void delete( )
      {
         BeforeValidate046( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency046( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls046( ) ;
            AfterConfirm046( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete046( ) ;
               if ( AnyError == 0 )
               {
                  ScanStart049( ) ;
                  while ( RcdFound9 != 0 )
                  {
                     getByPrimaryKey049( ) ;
                     Delete049( ) ;
                     ScanNext049( ) ;
                  }
                  ScanEnd049( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000427 */
                     pr_default.execute(22, new Object[] {A25CursoId});
                     pr_default.close(22);
                     if ( AnyError == 0 )
                     {
                        /* Start of After( delete) rules */
                        /* End of After( delete) rules */
                        if ( AnyError == 0 )
                        {
                           if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
                           {
                              if ( AnyError == 0 )
                              {
                                 context.nUserReturn = 1 ;
                              }
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
         }
         sMode6 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel046( ) ;
         Gx_mode = sMode6 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls046( )
      {
         standaloneModal( ) ;
         if ( AnyError == 0 )
         {
            /* Delete mode formulas */
            AV12Pgmname = "Curso" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12Pgmname", AV12Pgmname);
            /* Using cursor T000429 */
            pr_default.execute(23, new Object[] {A25CursoId});
            if ( (pr_default.getStatus(23) != 101) )
            {
               A27CursoNumeroAlumnos = T000429_A27CursoNumeroAlumnos[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
               n27CursoNumeroAlumnos = T000429_n27CursoNumeroAlumnos[0] ;
            }
            else
            {
               A27CursoNumeroAlumnos = 0 ;
               n27CursoNumeroAlumnos = false ;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            }
            pr_default.close(23);
         }
         if ( AnyError == 0 )
         {
            /* Using cursor T000430 */
            pr_default.execute(24, new Object[] {A25CursoId});
            if ( (pr_default.getStatus(24) != 101) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_del", new   object[]  {"Profesores"}), "CannotDeleteReferencedRecord", 1, "");
               AnyError = 1 ;
            }
            pr_default.close(24);
         }
      }

      protected void ProcessNestedLevel047( )
      {
         nGXsfl_65_idx = 0 ;
         while ( nGXsfl_65_idx < nRC_Grid1 )
         {
            ReadRow047( ) ;
            if ( ( nRcdExists_7 != 0 ) || ( nIsMod_7 != 0 ) )
            {
               standaloneNotModal047( ) ;
               GetKey047( ) ;
               if ( ( nRcdExists_7 == 0 ) && ( nRcdDeleted_7 == 0 ) )
               {
                  if ( RcdFound7 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Insert047( ) ;
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtProfesorId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound7 != 0 )
                  {
                     if ( ( nRcdDeleted_7 != 0 ) && ( nRcdExists_7 != 0 ) )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        Delete047( ) ;
                     }
                     else
                     {
                        if ( ( nIsMod_7 != 0 ) && ( nRcdExists_7 != 0 ) )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           Update047( ) ;
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_7 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtProfesorId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtProfesorId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A18ProfesorId), 4, 0, ",", ""))) ;
            ChangePostValue( edtProfesorApellidos_Internalname, StringUtil.RTrim( A19ProfesorApellidos)) ;
            ChangePostValue( edtProfesorNombre_Internalname, StringUtil.RTrim( A20ProfesorNombre)) ;
            ChangePostValue( edtProfesorNombreCompleto_Internalname, StringUtil.RTrim( A21ProfesorNombreCompleto)) ;
            ChangePostValue( "ZT_"+"Z18ProfesorId_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z18ProfesorId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRC_Gridcurso_profesores_materias_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRC_Gridcurso_profesores_materias), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_7), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_7), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_7_"+sGXsfl_65_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_7), 4, 0, ",", ""))) ;
            if ( nIsMod_7 != 0 )
            {
               ChangePostValue( "PROFESORID_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORAPELLIDOS_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorApellidos_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORNOMBRE_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombre_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
         InitAll047( ) ;
         if ( AnyError != 0 )
         {
         }
         nRcdExists_7 = 0 ;
         nIsMod_7 = 0 ;
         nRcdDeleted_7 = 0 ;
      }

      protected void ProcessNestedLevel049( )
      {
         nGXsfl_104_idx = 0 ;
         while ( nGXsfl_104_idx < nRC_Gridcurso_alumnos )
         {
            ReadRow049( ) ;
            if ( ( nRcdExists_9 != 0 ) || ( nIsMod_9 != 0 ) )
            {
               standaloneNotModal049( ) ;
               GetKey049( ) ;
               if ( ( nRcdExists_9 == 0 ) && ( nRcdDeleted_9 == 0 ) )
               {
                  if ( RcdFound9 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Insert049( ) ;
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtAlumnoId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound9 != 0 )
                  {
                     if ( ( nRcdDeleted_9 != 0 ) && ( nRcdExists_9 != 0 ) )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        Delete049( ) ;
                     }
                     else
                     {
                        if ( ( nIsMod_9 != 0 ) && ( nRcdExists_9 != 0 ) )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           Update049( ) ;
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_9 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtAlumnoId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtAlumnoId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A1AlumnoId), 4, 0, ",", ""))) ;
            ChangePostValue( edtAlumnoNombre_Internalname, StringUtil.RTrim( A2AlumnoNombre)) ;
            ChangePostValue( edtAlumnoApellidos_Internalname, StringUtil.RTrim( A3AlumnoApellidos)) ;
            ChangePostValue( edtAlumnoNombreCompleto_Internalname, StringUtil.RTrim( A4AlumnoNombreCompleto)) ;
            ChangePostValue( "ZT_"+"Z1AlumnoId_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z1AlumnoId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_9), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_9), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_9_"+sGXsfl_104_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_9), 4, 0, ",", ""))) ;
            if ( nIsMod_9 != 0 )
            {
               ChangePostValue( "ALUMNOID_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNONOMBRE_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombre_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNOAPELLIDOS_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoApellidos_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* Using cursor T000429 */
         pr_default.execute(23, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(23) != 101) )
         {
            A27CursoNumeroAlumnos = T000429_A27CursoNumeroAlumnos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
            n27CursoNumeroAlumnos = T000429_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         }
         /* End of After( level) rules */
         InitAll049( ) ;
         if ( AnyError != 0 )
         {
         }
         nRcdExists_9 = 0 ;
         nIsMod_9 = 0 ;
         nRcdDeleted_9 = 0 ;
      }

      protected void ProcessLevel046( )
      {
         /* Save parent mode. */
         sMode6 = Gx_mode ;
         ProcessNestedLevel047( ) ;
         ProcessNestedLevel049( ) ;
         if ( AnyError != 0 )
         {
         }
         /* Restore parent mode. */
         Gx_mode = sMode6 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         /* ' Update level parameters */
      }

      protected void EndLevel046( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(18);
         }
         if ( AnyError == 0 )
         {
            BeforeComplete046( ) ;
         }
         if ( AnyError == 0 )
         {
            pr_default.close(17);
            pr_default.close(16);
            pr_default.close(9);
            pr_default.close(8);
            pr_default.close(5);
            pr_default.close(4);
            pr_default.close(1);
            pr_default.close(0);
            pr_default.close(23);
            pr_default.close(10);
            pr_default.close(6);
            pr_default.close(7);
            pr_default.close(2);
            context.CommitDataStores("Curso");
            if ( AnyError == 0 )
            {
               ConfirmValues040( ) ;
            }
            /* After transaction rules */
            /* Execute 'After Trn' event if defined. */
            trnEnded = 1 ;
         }
         else
         {
            pr_default.close(17);
            pr_default.close(16);
            pr_default.close(9);
            pr_default.close(8);
            pr_default.close(5);
            pr_default.close(4);
            pr_default.close(1);
            pr_default.close(0);
            pr_default.close(23);
            pr_default.close(10);
            pr_default.close(6);
            pr_default.close(7);
            pr_default.close(2);
            context.RollbackDataStores("Curso");
         }
         IsModified = 0 ;
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      protected void ScanStart046( )
      {
         /* Using cursor T000431 */
         pr_default.execute(25);
         RcdFound6 = 0 ;
         if ( (pr_default.getStatus(25) != 101) )
         {
            RcdFound6 = 1 ;
            A25CursoId = T000431_A25CursoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext046( )
      {
         pr_default.readNext(25);
         RcdFound6 = 0 ;
         if ( (pr_default.getStatus(25) != 101) )
         {
            RcdFound6 = 1 ;
            A25CursoId = T000431_A25CursoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
         }
      }

      protected void ScanEnd046( )
      {
      }

      protected void AfterConfirm046( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert046( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate046( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete046( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete046( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate046( )
      {
         /* Before Validate Rules */
      }

      protected void ZM047( short GX_JID )
      {
         if ( ( GX_JID == 7 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
            }
            else
            {
            }
         }
         if ( GX_JID == -7 )
         {
            Z25CursoId = A25CursoId ;
            Z18ProfesorId = A18ProfesorId ;
            Z19ProfesorApellidos = A19ProfesorApellidos ;
            Z20ProfesorNombre = A20ProfesorNombre ;
         }
      }

      protected void standaloneNotModal047( )
      {
      }

      protected void standaloneModal047( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            edtProfesorId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
         }
         else
         {
            edtProfesorId_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
         }
      }

      protected void Load047( )
      {
         /* Using cursor T000432 */
         pr_default.execute(26, new Object[] {A25CursoId, A18ProfesorId});
         if ( (pr_default.getStatus(26) != 101) )
         {
            RcdFound7 = 1 ;
            A19ProfesorApellidos = T000432_A19ProfesorApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
            A20ProfesorNombre = T000432_A20ProfesorNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
            ZM047( -7) ;
         }
         pr_default.close(26);
         OnLoadActions047( ) ;
      }

      protected void OnLoadActions047( )
      {
         A21ProfesorNombreCompleto = A20ProfesorNombre + " " + A19ProfesorApellidos ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A21ProfesorNombreCompleto", A21ProfesorNombreCompleto);
      }

      protected void CheckExtendedTable047( )
      {
         Gx_BScreen = 1 ;
         standaloneModal047( ) ;
         /* Using cursor T000413 */
         pr_default.execute(10, new Object[] {A18ProfesorId});
         if ( (pr_default.getStatus(10) == 101) )
         {
            GX_msglist.addItem("No existe 'Profesor'.", "ForeignKeyNotFound", 1, "PROFESORID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A19ProfesorApellidos = T000413_A19ProfesorApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
            A20ProfesorNombre = T000413_A20ProfesorNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
         }
         pr_default.close(10);
         A21ProfesorNombreCompleto = A20ProfesorNombre + " " + A19ProfesorApellidos ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A21ProfesorNombreCompleto", A21ProfesorNombreCompleto);
      }

      protected void CloseExtendedTableCursors047( )
      {
         pr_default.close(10);
      }

      protected void enableDisable047( )
      {
      }

      protected void gxLoad_8( short A18ProfesorId )
      {
         /* Using cursor T000433 */
         pr_default.execute(27, new Object[] {A18ProfesorId});
         if ( (pr_default.getStatus(27) == 101) )
         {
            GX_msglist.addItem("No existe 'Profesor'.", "ForeignKeyNotFound", 1, "PROFESORID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A19ProfesorApellidos = T000433_A19ProfesorApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
            A20ProfesorNombre = T000433_A20ProfesorNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A19ProfesorApellidos))+"\""+","+"\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A20ProfesorNombre))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(27) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(27);
      }

      protected void GetKey047( )
      {
         /* Using cursor T000434 */
         pr_default.execute(28, new Object[] {A25CursoId, A18ProfesorId});
         if ( (pr_default.getStatus(28) != 101) )
         {
            RcdFound7 = 1 ;
         }
         else
         {
            RcdFound7 = 0 ;
         }
         pr_default.close(28);
      }

      protected void getByPrimaryKey047( )
      {
         /* Using cursor T000412 */
         pr_default.execute(9, new Object[] {A25CursoId, A18ProfesorId});
         if ( (pr_default.getStatus(9) != 101) )
         {
            ZM047( 7) ;
            RcdFound7 = 1 ;
            InitializeNonKey047( ) ;
            A18ProfesorId = T000412_A18ProfesorId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
            Z25CursoId = A25CursoId ;
            Z18ProfesorId = A18ProfesorId ;
            sMode7 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load047( ) ;
            Gx_mode = sMode7 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound7 = 0 ;
            InitializeNonKey047( ) ;
            sMode7 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal047( ) ;
            Gx_mode = sMode7 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(9);
      }

      protected void CheckOptimisticConcurrency047( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T000411 */
            pr_default.execute(8, new Object[] {A25CursoId, A18ProfesorId});
            if ( (pr_default.getStatus(8) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"CursoProfesores"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(8) == 101) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"CursoProfesores"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert047( )
      {
         BeforeValidate047( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable047( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM047( 0) ;
            CheckOptimisticConcurrency047( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm047( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert047( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000435 */
                     pr_default.execute(29, new Object[] {A25CursoId, A18ProfesorId});
                     pr_default.close(29);
                     if ( (pr_default.getStatus(29) == 1) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                        AnyError = 1 ;
                     }
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel047( ) ;
                           if ( AnyError == 0 )
                           {
                              /* Save values for previous() function. */
                           }
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load047( ) ;
            }
            EndLevel047( ) ;
         }
         CloseExtendedTableCursors047( ) ;
      }

      protected void Update047( )
      {
         BeforeValidate047( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable047( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency047( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm047( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate047( ) ;
                  if ( AnyError == 0 )
                  {
                     /* No attributes to update on table [CursoProfesores] */
                     DeferredUpdate047( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           ProcessLevel047( ) ;
                           if ( AnyError == 0 )
                           {
                              if ( ( StringUtil.StrCmp(Gx_mode, "UPD") == 0 ) || ( StringUtil.StrCmp(Gx_mode, "DLT") == 0 ) )
                              {
                                 if ( AnyError == 0 )
                                 {
                                    context.nUserReturn = 1 ;
                                 }
                              }
                           }
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel047( ) ;
         }
         CloseExtendedTableCursors047( ) ;
      }

      protected void DeferredUpdate047( )
      {
      }

      protected void Delete047( )
      {
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         BeforeValidate047( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency047( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls047( ) ;
            AfterConfirm047( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete047( ) ;
               if ( AnyError == 0 )
               {
                  ScanStart048( ) ;
                  while ( RcdFound8 != 0 )
                  {
                     getByPrimaryKey048( ) ;
                     Delete048( ) ;
                     ScanNext048( ) ;
                  }
                  ScanEnd048( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000436 */
                     pr_default.execute(30, new Object[] {A25CursoId, A18ProfesorId});
                     pr_default.close(30);
                     if ( AnyError == 0 )
                     {
                        /* Start of After( delete) rules */
                        /* End of After( delete) rules */
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
         }
         sMode7 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel047( ) ;
         Gx_mode = sMode7 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls047( )
      {
         standaloneModal047( ) ;
         if ( AnyError == 0 )
         {
            /* Delete mode formulas */
            /* Using cursor T000437 */
            pr_default.execute(31, new Object[] {A18ProfesorId});
            A19ProfesorApellidos = T000437_A19ProfesorApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
            A20ProfesorNombre = T000437_A20ProfesorNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
            pr_default.close(31);
            A21ProfesorNombreCompleto = A20ProfesorNombre + " " + A19ProfesorApellidos ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A21ProfesorNombreCompleto", A21ProfesorNombreCompleto);
         }
      }

      protected void ProcessNestedLevel048( )
      {
         nGXsfl_95_idx = 0 ;
         while ( nGXsfl_95_idx < nRC_Gridcurso_profesores_materias )
         {
            ReadRow048( ) ;
            if ( ( nRcdExists_8 != 0 ) || ( nIsMod_8 != 0 ) )
            {
               standaloneNotModal048( ) ;
               GetKey048( ) ;
               if ( ( nRcdExists_8 == 0 ) && ( nRcdDeleted_8 == 0 ) )
               {
                  if ( RcdFound8 == 0 )
                  {
                     Gx_mode = "INS" ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                     Insert048( ) ;
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                     AnyError = 1 ;
                     GX_FocusControl = edtProfesorId_Internalname ;
                     context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                  }
               }
               else
               {
                  if ( RcdFound8 != 0 )
                  {
                     if ( ( nRcdDeleted_8 != 0 ) && ( nRcdExists_8 != 0 ) )
                     {
                        Gx_mode = "DLT" ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                        Delete048( ) ;
                     }
                     else
                     {
                        if ( ( nIsMod_8 != 0 ) && ( nRcdExists_8 != 0 ) )
                        {
                           Gx_mode = "UPD" ;
                           context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                           Update048( ) ;
                        }
                     }
                  }
                  else
                  {
                     if ( nRcdDeleted_8 == 0 )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_recdeleted"), 1, "");
                        AnyError = 1 ;
                        GX_FocusControl = edtProfesorId_Internalname ;
                        context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
                     }
                  }
               }
            }
            ChangePostValue( edtMateriaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A15MateriaId), 4, 0, ",", ""))) ;
            ChangePostValue( edtMateriaNombre_Internalname, StringUtil.RTrim( A16MateriaNombre)) ;
            ChangePostValue( "ZT_"+"Z15MateriaId_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z15MateriaId), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdDeleted_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_8), 4, 0, ",", ""))) ;
            ChangePostValue( "nRcdExists_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_8), 4, 0, ",", ""))) ;
            ChangePostValue( "nIsMod_8_"+sGXsfl_95_idx, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_8), 4, 0, ",", ""))) ;
            if ( nIsMod_8 != 0 )
            {
               ChangePostValue( "MATERIAID_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaId_Enabled), 5, 0, ".", ""))) ;
               ChangePostValue( "MATERIANOMBRE_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaNombre_Enabled), 5, 0, ".", ""))) ;
            }
         }
         /* Start of After( level) rules */
         /* End of After( level) rules */
         InitAll048( ) ;
         if ( AnyError != 0 )
         {
         }
         nRcdExists_8 = 0 ;
         nIsMod_8 = 0 ;
         nRcdDeleted_8 = 0 ;
      }

      protected void ProcessLevel047( )
      {
         /* Save parent mode. */
         sMode7 = Gx_mode ;
         ProcessNestedLevel048( ) ;
         if ( AnyError != 0 )
         {
         }
         /* Restore parent mode. */
         Gx_mode = sMode7 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         /* ' Update level parameters */
      }

      protected void EndLevel047( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(8);
         }
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      protected void ScanStart047( )
      {
         /* Using cursor T000438 */
         pr_default.execute(32, new Object[] {A25CursoId});
         RcdFound7 = 0 ;
         if ( (pr_default.getStatus(32) != 101) )
         {
            RcdFound7 = 1 ;
            A18ProfesorId = T000438_A18ProfesorId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext047( )
      {
         pr_default.readNext(32);
         RcdFound7 = 0 ;
         if ( (pr_default.getStatus(32) != 101) )
         {
            RcdFound7 = 1 ;
            A18ProfesorId = T000438_A18ProfesorId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
         }
      }

      protected void ScanEnd047( )
      {
         pr_default.close(9);
      }

      protected void AfterConfirm047( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert047( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate047( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete047( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete047( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate047( )
      {
         /* Before Validate Rules */
      }

      protected void ZM048( short GX_JID )
      {
         if ( ( GX_JID == 9 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
            }
            else
            {
            }
         }
         if ( GX_JID == -9 )
         {
            Z25CursoId = A25CursoId ;
            Z18ProfesorId = A18ProfesorId ;
            Z15MateriaId = A15MateriaId ;
            Z16MateriaNombre = A16MateriaNombre ;
         }
      }

      protected void standaloneNotModal048( )
      {
      }

      protected void standaloneModal048( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            edtMateriaId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
         }
         else
         {
            edtMateriaId_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
         }
      }

      protected void Load048( )
      {
         /* Using cursor T000439 */
         pr_default.execute(33, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(33) != 101) )
         {
            RcdFound8 = 1 ;
            A16MateriaNombre = T000439_A16MateriaNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
            ZM048( -9) ;
         }
         pr_default.close(33);
         OnLoadActions048( ) ;
      }

      protected void OnLoadActions048( )
      {
      }

      protected void CheckExtendedTable048( )
      {
         Gx_BScreen = 1 ;
         standaloneModal048( ) ;
         /* Using cursor T00049 */
         pr_default.execute(6, new Object[] {A15MateriaId});
         if ( (pr_default.getStatus(6) == 101) )
         {
            GX_msglist.addItem("No existe 'Materia'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtMateriaId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A16MateriaNombre = T00049_A16MateriaNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
         }
         pr_default.close(6);
         /* Using cursor T000410 */
         pr_default.execute(7, new Object[] {A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(7) == 101) )
         {
            GX_msglist.addItem("No existe 'Imparte'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
         }
         pr_default.close(7);
      }

      protected void CloseExtendedTableCursors048( )
      {
         pr_default.close(6);
         pr_default.close(7);
      }

      protected void enableDisable048( )
      {
      }

      protected void gxLoad_10( short A15MateriaId )
      {
         /* Using cursor T000440 */
         pr_default.execute(34, new Object[] {A15MateriaId});
         if ( (pr_default.getStatus(34) == 101) )
         {
            GX_msglist.addItem("No existe 'Materia'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtMateriaId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A16MateriaNombre = T000440_A16MateriaNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A16MateriaNombre))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(34) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(34);
      }

      protected void gxLoad_11( short A18ProfesorId ,
                                short A15MateriaId )
      {
         /* Using cursor T000441 */
         pr_default.execute(35, new Object[] {A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(35) == 101) )
         {
            GX_msglist.addItem("No existe 'Imparte'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(35) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(35);
      }

      protected void GetKey048( )
      {
         /* Using cursor T000442 */
         pr_default.execute(36, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(36) != 101) )
         {
            RcdFound8 = 1 ;
         }
         else
         {
            RcdFound8 = 0 ;
         }
         pr_default.close(36);
      }

      protected void getByPrimaryKey048( )
      {
         /* Using cursor T00048 */
         pr_default.execute(5, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(5) != 101) )
         {
            ZM048( 9) ;
            RcdFound8 = 1 ;
            InitializeNonKey048( ) ;
            A15MateriaId = T00048_A15MateriaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
            Z25CursoId = A25CursoId ;
            Z18ProfesorId = A18ProfesorId ;
            Z15MateriaId = A15MateriaId ;
            sMode8 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load048( ) ;
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound8 = 0 ;
            InitializeNonKey048( ) ;
            sMode8 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal048( ) ;
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(5);
      }

      protected void CheckOptimisticConcurrency048( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T00047 */
            pr_default.execute(4, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
            if ( (pr_default.getStatus(4) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"CursoProfesoresMaterias"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(4) == 101) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"CursoProfesoresMaterias"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert048( )
      {
         BeforeValidate048( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable048( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM048( 0) ;
            CheckOptimisticConcurrency048( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm048( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert048( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000443 */
                     pr_default.execute(37, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
                     pr_default.close(37);
                     if ( (pr_default.getStatus(37) == 1) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                        AnyError = 1 ;
                     }
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           /* Save values for previous() function. */
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load048( ) ;
            }
            EndLevel048( ) ;
         }
         CloseExtendedTableCursors048( ) ;
      }

      protected void Update048( )
      {
         BeforeValidate048( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable048( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency048( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm048( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate048( ) ;
                  if ( AnyError == 0 )
                  {
                     /* No attributes to update on table [CursoProfesoresMaterias] */
                     DeferredUpdate048( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           getByPrimaryKey048( ) ;
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel048( ) ;
         }
         CloseExtendedTableCursors048( ) ;
      }

      protected void DeferredUpdate048( )
      {
      }

      protected void Delete048( )
      {
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         BeforeValidate048( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency048( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls048( ) ;
            AfterConfirm048( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete048( ) ;
               if ( AnyError == 0 )
               {
                  /* No cascading delete specified. */
                  /* Using cursor T000444 */
                  pr_default.execute(38, new Object[] {A25CursoId, A18ProfesorId, A15MateriaId});
                  pr_default.close(38);
                  if ( AnyError == 0 )
                  {
                     /* Start of After( delete) rules */
                     /* End of After( delete) rules */
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
         }
         sMode8 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel048( ) ;
         Gx_mode = sMode8 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls048( )
      {
         standaloneModal048( ) ;
         if ( AnyError == 0 )
         {
            /* Delete mode formulas */
            /* Using cursor T000445 */
            pr_default.execute(39, new Object[] {A15MateriaId});
            A16MateriaNombre = T000445_A16MateriaNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
            pr_default.close(39);
         }
      }

      protected void EndLevel048( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(4);
         }
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      protected void ScanStart048( )
      {
         /* Using cursor T000446 */
         pr_default.execute(40, new Object[] {A25CursoId, A18ProfesorId});
         RcdFound8 = 0 ;
         if ( (pr_default.getStatus(40) != 101) )
         {
            RcdFound8 = 1 ;
            A15MateriaId = T000446_A15MateriaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext048( )
      {
         pr_default.readNext(40);
         RcdFound8 = 0 ;
         if ( (pr_default.getStatus(40) != 101) )
         {
            RcdFound8 = 1 ;
            A15MateriaId = T000446_A15MateriaId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
         }
      }

      protected void ScanEnd048( )
      {
         pr_default.close(5);
      }

      protected void AfterConfirm048( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert048( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate048( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete048( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete048( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate048( )
      {
         /* Before Validate Rules */
      }

      protected void ZM049( short GX_JID )
      {
         if ( ( GX_JID == 12 ) || ( GX_JID == 0 ) )
         {
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
            }
            else
            {
            }
         }
         if ( GX_JID == -12 )
         {
            Z25CursoId = A25CursoId ;
            Z1AlumnoId = A1AlumnoId ;
            Z2AlumnoNombre = A2AlumnoNombre ;
            Z3AlumnoApellidos = A3AlumnoApellidos ;
         }
      }

      protected void standaloneNotModal049( )
      {
      }

      protected void standaloneModal049( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            edtAlumnoId_Enabled = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
         }
         else
         {
            edtAlumnoId_Enabled = 1 ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
         }
      }

      protected void Load049( )
      {
         /* Using cursor T000447 */
         pr_default.execute(41, new Object[] {A25CursoId, A1AlumnoId});
         if ( (pr_default.getStatus(41) != 101) )
         {
            RcdFound9 = 1 ;
            A2AlumnoNombre = T000447_A2AlumnoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
            A3AlumnoApellidos = T000447_A3AlumnoApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
            ZM049( -12) ;
         }
         pr_default.close(41);
         OnLoadActions049( ) ;
      }

      protected void OnLoadActions049( )
      {
         A4AlumnoNombreCompleto = A2AlumnoNombre + " " + A3AlumnoApellidos ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A4AlumnoNombreCompleto", A4AlumnoNombreCompleto);
      }

      protected void CheckExtendedTable049( )
      {
         Gx_BScreen = 1 ;
         standaloneModal049( ) ;
         /* Using cursor T00044 */
         pr_default.execute(2, new Object[] {A1AlumnoId});
         if ( (pr_default.getStatus(2) == 101) )
         {
            GX_msglist.addItem("No existe 'Alumno'.", "ForeignKeyNotFound", 1, "ALUMNOID");
            AnyError = 1 ;
            GX_FocusControl = edtAlumnoId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A2AlumnoNombre = T00044_A2AlumnoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
            A3AlumnoApellidos = T00044_A3AlumnoApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
         }
         pr_default.close(2);
         A4AlumnoNombreCompleto = A2AlumnoNombre + " " + A3AlumnoApellidos ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A4AlumnoNombreCompleto", A4AlumnoNombreCompleto);
      }

      protected void CloseExtendedTableCursors049( )
      {
         pr_default.close(2);
      }

      protected void enableDisable049( )
      {
      }

      protected void gxLoad_13( short A1AlumnoId )
      {
         /* Using cursor T000448 */
         pr_default.execute(42, new Object[] {A1AlumnoId});
         if ( (pr_default.getStatus(42) == 101) )
         {
            GX_msglist.addItem("No existe 'Alumno'.", "ForeignKeyNotFound", 1, "ALUMNOID");
            AnyError = 1 ;
            GX_FocusControl = edtAlumnoId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
         }
         if ( AnyError == 0 )
         {
            A2AlumnoNombre = T000448_A2AlumnoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
            A3AlumnoApellidos = T000448_A3AlumnoApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
         }
         GxWebStd.set_html_headers( context, 0, "", "");
         context.GX_webresponse.AddString("new Array( new Array(");
         context.GX_webresponse.AddString("\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A2AlumnoNombre))+"\""+","+"\""+GXUtil.EncodeJSConstant( StringUtil.RTrim( A3AlumnoApellidos))+"\"");
         context.GX_webresponse.AddString(")");
         if ( (pr_default.getStatus(42) == 101) )
         {
            context.GX_webresponse.AddString(",");
            context.GX_webresponse.AddString("101");
         }
         context.GX_webresponse.AddString(")");
         pr_default.close(42);
      }

      protected void GetKey049( )
      {
         /* Using cursor T000449 */
         pr_default.execute(43, new Object[] {A25CursoId, A1AlumnoId});
         if ( (pr_default.getStatus(43) != 101) )
         {
            RcdFound9 = 1 ;
         }
         else
         {
            RcdFound9 = 0 ;
         }
         pr_default.close(43);
      }

      protected void getByPrimaryKey049( )
      {
         /* Using cursor T00043 */
         pr_default.execute(1, new Object[] {A25CursoId, A1AlumnoId});
         if ( (pr_default.getStatus(1) != 101) )
         {
            ZM049( 12) ;
            RcdFound9 = 1 ;
            InitializeNonKey049( ) ;
            A1AlumnoId = T00043_A1AlumnoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
            Z25CursoId = A25CursoId ;
            Z1AlumnoId = A1AlumnoId ;
            sMode9 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            Load049( ) ;
            Gx_mode = sMode9 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            RcdFound9 = 0 ;
            InitializeNonKey049( ) ;
            sMode9 = Gx_mode ;
            Gx_mode = "DSP" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            standaloneModal049( ) ;
            Gx_mode = sMode9 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         pr_default.close(1);
      }

      protected void CheckOptimisticConcurrency049( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            /* Using cursor T00042 */
            pr_default.execute(0, new Object[] {A25CursoId, A1AlumnoId});
            if ( (pr_default.getStatus(0) == 103) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_lock", new   object[]  {"CursoAlumnos"}), "RecordIsLocked", 1, "");
               AnyError = 1 ;
               return  ;
            }
            if ( (pr_default.getStatus(0) == 101) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_waschg", new   object[]  {"CursoAlumnos"}), "RecordWasChanged", 1, "");
               AnyError = 1 ;
               return  ;
            }
         }
      }

      protected void Insert049( )
      {
         BeforeValidate049( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable049( ) ;
         }
         if ( AnyError == 0 )
         {
            ZM049( 0) ;
            CheckOptimisticConcurrency049( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm049( ) ;
               if ( AnyError == 0 )
               {
                  BeforeInsert049( ) ;
                  if ( AnyError == 0 )
                  {
                     /* Using cursor T000450 */
                     pr_default.execute(44, new Object[] {A25CursoId, A1AlumnoId});
                     pr_default.close(44);
                     if ( (pr_default.getStatus(44) == 1) )
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_noupdate"), "DuplicatePrimaryKey", 1, "");
                        AnyError = 1 ;
                     }
                     if ( AnyError == 0 )
                     {
                        /* Start of After( Insert) rules */
                        /* End of After( Insert) rules */
                        if ( AnyError == 0 )
                        {
                           /* Save values for previous() function. */
                        }
                     }
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
            else
            {
               Load049( ) ;
            }
            EndLevel049( ) ;
         }
         CloseExtendedTableCursors049( ) ;
      }

      protected void Update049( )
      {
         BeforeValidate049( ) ;
         if ( AnyError == 0 )
         {
            CheckExtendedTable049( ) ;
         }
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency049( ) ;
            if ( AnyError == 0 )
            {
               AfterConfirm049( ) ;
               if ( AnyError == 0 )
               {
                  BeforeUpdate049( ) ;
                  if ( AnyError == 0 )
                  {
                     /* No attributes to update on table [CursoAlumnos] */
                     DeferredUpdate049( ) ;
                     if ( AnyError == 0 )
                     {
                        /* Start of After( update) rules */
                        /* End of After( update) rules */
                        if ( AnyError == 0 )
                        {
                           getByPrimaryKey049( ) ;
                        }
                     }
                     else
                     {
                        GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                        AnyError = 1 ;
                     }
                  }
               }
            }
            EndLevel049( ) ;
         }
         CloseExtendedTableCursors049( ) ;
      }

      protected void DeferredUpdate049( )
      {
      }

      protected void Delete049( )
      {
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         BeforeValidate049( ) ;
         if ( AnyError == 0 )
         {
            CheckOptimisticConcurrency049( ) ;
         }
         if ( AnyError == 0 )
         {
            OnDeleteControls049( ) ;
            AfterConfirm049( ) ;
            if ( AnyError == 0 )
            {
               BeforeDelete049( ) ;
               if ( AnyError == 0 )
               {
                  /* No cascading delete specified. */
                  /* Using cursor T000451 */
                  pr_default.execute(45, new Object[] {A25CursoId, A1AlumnoId});
                  pr_default.close(45);
                  if ( AnyError == 0 )
                  {
                     /* Start of After( delete) rules */
                     /* End of After( delete) rules */
                  }
                  else
                  {
                     GX_msglist.addItem(context.GetMessage( "GXM_unexp"), 1, "");
                     AnyError = 1 ;
                  }
               }
            }
         }
         sMode9 = Gx_mode ;
         Gx_mode = "DLT" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         EndLevel049( ) ;
         Gx_mode = sMode9 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
      }

      protected void OnDeleteControls049( )
      {
         standaloneModal049( ) ;
         if ( AnyError == 0 )
         {
            /* Delete mode formulas */
            /* Using cursor T000452 */
            pr_default.execute(46, new Object[] {A1AlumnoId});
            A2AlumnoNombre = T000452_A2AlumnoNombre[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
            A3AlumnoApellidos = T000452_A3AlumnoApellidos[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
            pr_default.close(46);
            A4AlumnoNombreCompleto = A2AlumnoNombre + " " + A3AlumnoApellidos ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A4AlumnoNombreCompleto", A4AlumnoNombreCompleto);
         }
      }

      protected void EndLevel049( )
      {
         if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
         {
            pr_default.close(0);
         }
         if ( AnyError != 0 )
         {
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
         }
      }

      protected void ScanStart049( )
      {
         /* Using cursor T000453 */
         pr_default.execute(47, new Object[] {A25CursoId});
         RcdFound9 = 0 ;
         if ( (pr_default.getStatus(47) != 101) )
         {
            RcdFound9 = 1 ;
            A1AlumnoId = T000453_A1AlumnoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
         }
         /* Load Subordinate Levels */
      }

      protected void ScanNext049( )
      {
         pr_default.readNext(47);
         RcdFound9 = 0 ;
         if ( (pr_default.getStatus(47) != 101) )
         {
            RcdFound9 = 1 ;
            A1AlumnoId = T000453_A1AlumnoId[0] ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
         }
      }

      protected void ScanEnd049( )
      {
         pr_default.close(1);
      }

      protected void AfterConfirm049( )
      {
         /* After Confirm Rules */
      }

      protected void BeforeInsert049( )
      {
         /* Before Insert Rules */
      }

      protected void BeforeUpdate049( )
      {
         /* Before Update Rules */
      }

      protected void BeforeDelete049( )
      {
         /* Before Delete Rules */
      }

      protected void BeforeComplete049( )
      {
         /* Before Complete Rules */
      }

      protected void BeforeValidate049( )
      {
         /* Before Validate Rules */
      }

      protected void AddRow047( )
      {
         nRC_Gridcurso_profesores_materias = 0 ;
         nGXsfl_65_idx = (short)(nGXsfl_65_idx+1) ;
         sGXsfl_65_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_65_idx), 4, 0)), 4, "0") ;
         lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
         edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
         lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
         edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
         lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
         imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
         subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         SendRow047( ) ;
      }

      protected void SendRow047( )
      {
         Grid1Row = GXWebRow.GetNew(context) ;
         if ( subGrid1_Backcolorstyle == 0 )
         {
            /* None style subfile background logic. */
            subGrid1_Backstyle = 0 ;
            if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
            {
               subGrid1_Linesclass = subGrid1_Class+"Odd" ;
            }
         }
         else if ( subGrid1_Backcolorstyle == 1 )
         {
            /* Uniform style subfile background logic. */
            subGrid1_Backstyle = 0 ;
            subGrid1_Backcolor = subGrid1_Allbackcolor ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Grid1ContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGrid1_Backcolor), 9, 0)));
            if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
            {
               subGrid1_Linesclass = subGrid1_Class+"Uniform" ;
            }
         }
         else if ( subGrid1_Backcolorstyle == 2 )
         {
            /* Header style subfile background logic. */
            subGrid1_Backstyle = 1 ;
            if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
            {
               subGrid1_Linesclass = subGrid1_Class+"Odd" ;
            }
            subGrid1_Backcolor = (int)(0xFFFFFF) ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Grid1ContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGrid1_Backcolor), 9, 0)));
         }
         else if ( subGrid1_Backcolorstyle == 3 )
         {
            /* Report style subfile background logic. */
            subGrid1_Backstyle = 1 ;
            if ( ((int)(nGXsfl_65_idx/ (decimal)(3)) % (2)) == 0 )
            {
               subGrid1_Backcolor = (int)(0x0) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Grid1ContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGrid1_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
               {
                  subGrid1_Linesclass = subGrid1_Class+"Even" ;
               }
            }
            else
            {
               subGrid1_Backcolor = (int)(0xFFFFFF) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Grid1ContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGrid1_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
               {
                  subGrid1_Linesclass = subGrid1_Class+"Odd" ;
               }
            }
         }
         /* Start of Columns property logic. */
         if ( Grid1Container.GetWrapped() == 1 )
         {
            if ( ( 3 == 0 ) && ( nGXsfl_65_idx == 1 ) )
            {
               context.WriteHtmlText( "<tr"+" class=\""+subGrid1_Linesclass+"\" style=\""+""+"\""+">") ;
            }
            if ( 3 > 0 )
            {
               if ( ( 3 == 1 ) || ( ((int)(nGXsfl_65_idx) % (3)) - 1 == 0 ) )
               {
                  context.WriteHtmlText( "<tr"+" class=\""+subGrid1_Linesclass+"\" style=\""+""+"\""+">") ;
               }
            }
         }
         imgprompt_18_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0)||(StringUtil.StrCmp(Gx_mode, "UPD")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx0040.aspx"+"',["+"{Ctrl:gx.dom.el('"+"PROFESORID_"+sGXsfl_65_idx+"'), id:'"+"PROFESORID_"+sGXsfl_65_idx+"'"+",isOut:true,isKey:false,isLastKey:false}"+"],"+"gx.dom.form()."+"nIsMod_7_"+sGXsfl_65_idx+","+"'', false"+","+"false"+","+"false"+");") ;
         /* * Property Link not supported in */
         /* * Property Link not supported in */
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)subGrid1_Linesclass,(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Table start */
         Grid1Row.AddColumnProperties("table", -1, isAjaxCallMode( ), new Object[] {(String)tblTable4_Internalname+"_"+sGXsfl_65_idx,(short)1,(String)"Table",(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(short)1,(short)2,(String)"",(String)"",(String)"",(String)"px",(String)"px"});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Text block */
         ClassString = "TextBlock" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("label", 4, isAjaxCallMode( ), new Object[] {(String)lblTextblockprofesorid_Internalname,(short)1,(short)1,(short)0,(String)"Profesor Id",(String)"",(String)"",(String)"",(short)0,(String)lblTextblockprofesorid_Jsonclick,(String)"",(String)StyleString,(String)ClassString});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Single line edit */
         TempTags = " gxoch1=\"gx.fn.setControlValue('nIsMod_7_" + sGXsfl_65_idx + "',1);\"  onfocus=\"gx.evt.onfocus(this, 73,'',false,'" + sGXsfl_65_idx + "',65)\"" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtProfesorId_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A18ProfesorId), 4, 0, ",", "")),(String)"",(short)4,(String)"chr",(short)1,(String)"row",(short)4,(short)1,(int)edtProfesorId_Enabled,(short)1,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,context.localUtil.Format( (decimal)(A18ProfesorId), "ZZZ9"),TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(73);\"",(short)0,(String)edtProfesorId_Jsonclick,(String)"",(short)65,(short)1,(short)-1,(bool)true,(String)"right"});
         /* Static images/pictures */
         ClassString = "Image" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("bitmap", 2, isAjaxCallMode( ), new Object[] {(String)imgprompt_18_Internalname,(String)"","prompt.gif",(String)"Classic",(int)imgprompt_18_Visible,(short)1,(String)"",(String)"",(short)0,(short)0,(short)0,(String)"",(short)0,(String)"",(short)0,(short)0,(String)imgprompt_18_Link,(String)"",(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)"",(String)"",(String)"''",(String)""});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Text block */
         ClassString = "TextBlock" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("label", 4, isAjaxCallMode( ), new Object[] {(String)lblTextblockprofesorapellidos_Internalname,(short)1,(short)1,(short)0,(String)"Profesor Apellidos",(String)"",(String)"",(String)"",(short)0,(String)lblTextblockprofesorapellidos_Jsonclick,(String)"",(String)StyleString,(String)ClassString});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtProfesorApellidos_Internalname,StringUtil.RTrim( A19ProfesorApellidos),(String)"",(short)80,(String)"chr",(short)1,(String)"row",(short)120,(short)1,(int)edtProfesorApellidos_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A19ProfesorApellidos, "")),(String)"",(short)0,(String)edtProfesorApellidos_Jsonclick,(String)"",(short)65,(short)1,(short)-1,(bool)true,(String)"left"});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Text block */
         ClassString = "TextBlock" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("label", 4, isAjaxCallMode( ), new Object[] {(String)lblTextblockprofesornombre_Internalname,(short)1,(short)1,(short)0,(String)"Profesor Nombre",(String)"",(String)"",(String)"",(short)0,(String)lblTextblockprofesornombre_Jsonclick,(String)"",(String)StyleString,(String)ClassString});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtProfesorNombre_Internalname,StringUtil.RTrim( A20ProfesorNombre),(String)"",(short)80,(String)"chr",(short)1,(String)"row",(short)100,(short)1,(int)edtProfesorNombre_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A20ProfesorNombre, "")),(String)"",(short)0,(String)edtProfesorNombre_Jsonclick,(String)"",(short)65,(short)1,(short)-1,(bool)true,(String)"left"});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Text block */
         ClassString = "TextBlock" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("label", 4, isAjaxCallMode( ), new Object[] {(String)lblTextblockprofesornombrecompleto_Internalname,(short)1,(short)1,(short)0,(String)"Profesor Nombre Completo",(String)"",(String)"",(String)"",(short)0,(String)lblTextblockprofesornombrecompleto_Jsonclick,(String)"",(String)StyleString,(String)ClassString});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Multiple line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("html_textarea", 1, isAjaxCallMode( ), new Object[] {(String)edtProfesorNombreCompleto_Internalname,StringUtil.RTrim( A21ProfesorNombreCompleto),(short)1,(int)edtProfesorNombreCompleto_Enabled,(short)0,(short)80,(String)"chr",(short)3,(String)"row",(String)StyleString,(String)ClassString,(String)"220",(String)"",(short)-1,(short)0,(String)"",(String)"",(bool)true});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Table start */
         Grid1Row.AddColumnProperties("table", -1, isAjaxCallMode( ), new Object[] {(String)tblTable5_Internalname+"_"+sGXsfl_65_idx,(short)1,(String)"Table95",(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(short)1,(short)2,(String)"",(String)"",(String)"",(String)"px",(String)"px"});
         Grid1Row.AddColumnProperties("row", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)"",(String)""});
         Grid1Row.AddColumnProperties("cell", -1, isAjaxCallMode( ), new Object[] {(String)"",(String)""});
         /* Text block */
         ClassString = "" ;
         StyleString = "" ;
         Grid1Row.AddColumnProperties("label", 4, isAjaxCallMode( ), new Object[] {(String)lblTitlematerias_Internalname,(short)1,(short)1,(short)0,(String)"Materias",(String)"",(String)"",(String)"",(short)0,(String)lblTitlematerias_Jsonclick,(String)"",(String)StyleString,(String)ClassString});
         /* End of table */
         /*  Child Grid Control  */
         Grid1Row.AddColumnProperties("subfile", -1, isAjaxCallMode( ), new Object[] {(String)"Gridcurso_profesores_materiasContainer"});
         Gridcurso_profesores_materiasContainer.Clear();
         Gridcurso_profesores_materiasContainer.AddObjectProperty("GridName", "Gridcurso_profesores_materias");
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Class", "Grid");
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Cellpadding", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Cellspacing", StringUtil.LTrim( StringUtil.NToC( (decimal)(2), 4, 0, ".", "")));
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Backcolorstyle", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridcurso_profesores_materias_Backcolorstyle), 1, 0, ".", "")));
         Gridcurso_profesores_materiasContainer.AddObjectProperty("CmpContext", "");
         Gridcurso_profesores_materiasContainer.AddObjectProperty("InMasterPage", "false");
         Gridcurso_profesores_materiasColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
         Gridcurso_profesores_materiasColumn.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A15MateriaId), 4, 0, ".", "")));
         Gridcurso_profesores_materiasColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaId_Enabled), 5, 0, ".", "")));
         Gridcurso_profesores_materiasContainer.AddColumnProperties(Gridcurso_profesores_materiasColumn);
         Gridcurso_profesores_materiasColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
         Gridcurso_profesores_materiasContainer.AddColumnProperties(Gridcurso_profesores_materiasColumn);
         Gridcurso_profesores_materiasColumn = GXWebColumn.GetNew(isAjaxCallMode( )) ;
         Gridcurso_profesores_materiasColumn.AddObjectProperty("Value", StringUtil.RTrim( A16MateriaNombre));
         Gridcurso_profesores_materiasColumn.AddObjectProperty("Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaNombre_Enabled), 5, 0, ".", "")));
         Gridcurso_profesores_materiasContainer.AddColumnProperties(Gridcurso_profesores_materiasColumn);
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Allowselection", "false");
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Allowcollapsing", "false");
         Gridcurso_profesores_materiasContainer.AddObjectProperty("Collapsed", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGridcurso_profesores_materias_Collapsed), 9, 0, ".", "")));
         nGXsfl_95_idx = 0 ;
         if ( ( nKeyPressed == 1 ) && ( AnyError == 0 ) )
         {
            /* Enter key processing. */
            nBlankRcdCount8 = 5 ;
            if ( StringUtil.StrCmp(Gx_mode, "INS") != 0 )
            {
               /* Display confirmed (stored) records */
               nRcdExists_8 = 1 ;
               ScanStart048( ) ;
               while ( RcdFound8 != 0 )
               {
                  init_level_properties8( ) ;
                  getByPrimaryKey048( ) ;
                  AddRow048( ) ;
                  ScanNext048( ) ;
               }
               ScanEnd048( ) ;
               nBlankRcdCount8 = 5 ;
            }
         }
         else if ( ( nKeyPressed == 3 ) || ( nKeyPressed == 4 ) || ( ( nKeyPressed == 1 ) && ( AnyError != 0 ) ) )
         {
            /* Button check  or addlines. */
            standaloneNotModal048( ) ;
            standaloneModal048( ) ;
            sMode8 = Gx_mode ;
            while ( nGXsfl_95_idx < nRC_Gridcurso_profesores_materias )
            {
               ReadRow048( ) ;
               edtMateriaId_Enabled = (int)(context.localUtil.CToN( cgiGet( "MATERIAID_"+sGXsfl_95_idx+"Enabled"), ",", ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
               edtMateriaNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "MATERIANOMBRE_"+sGXsfl_95_idx+"Enabled"), ",", ".")) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaNombre_Enabled), 5, 0)));
               imgprompt_15_Link = cgiGet( "PROMPT_15_"+sGXsfl_95_idx+"Link") ;
               if ( ( nRcdExists_8 == 0 ) && ( StringUtil.StrCmp(Gx_mode, "INS") != 0 ) )
               {
                  Gx_mode = "INS" ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
                  standaloneModal048( ) ;
               }
               SendRow048( ) ;
            }
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         else
         {
            /* Get or get-alike key processing. */
            nBlankRcdCount8 = 5 ;
            nRcdExists_8 = 1 ;
            ScanStart048( ) ;
            while ( RcdFound8 != 0 )
            {
               init_level_properties8( ) ;
               getByPrimaryKey048( ) ;
               standaloneNotModal048( ) ;
               standaloneModal048( ) ;
               AddRow048( ) ;
               ScanNext048( ) ;
            }
            ScanEnd048( ) ;
         }
         /* Initialize fields for 'new' records and send them. */
         if ( StringUtil.StrCmp(Gx_mode, "DSP") != 0 )
         {
            sMode8 = Gx_mode ;
            Gx_mode = "INS" ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
            InitAll048( ) ;
            init_level_properties8( ) ;
            standaloneNotModal048( ) ;
            standaloneModal048( ) ;
            nRcdExists_8 = 0 ;
            nIsMod_8 = 0 ;
            if ( ( NumberUtil.Val( EvtGridId, ".") + NumberUtil.Val( EvtRowId, ".") == Convert.ToDecimal( 0 )) || (Convert.ToDecimal( 65 ) == NumberUtil.Val( EvtGridId, ".") ) && ( NumberUtil.Val( EvtRowId, ".") == NumberUtil.Val( sGXsfl_65_idx, ".") ) )
            {
               nBlankRcdCount8 = (short)(nBlankRcdUsr8+nBlankRcdCount8) ;
            }
            fRowAdded = 0 ;
            while ( nBlankRcdCount8 > 0 )
            {
               AddRow048( ) ;
               if ( ( nKeyPressed == 4 ) && ( fRowAdded == 0 ) )
               {
                  fRowAdded = 1 ;
                  GX_FocusControl = edtMateriaId_Internalname ;
                  context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               }
               nBlankRcdCount8 = (short)(nBlankRcdCount8-1) ;
            }
            Gx_mode = sMode8 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         }
         GxWebStd.gx_hidden_field( context, "Gridcurso_profesores_materiasContainerData"+"_"+sGXsfl_65_idx, Gridcurso_profesores_materiasContainer.ToJavascriptSource());
         if ( isAjaxCallMode( ) )
         {
            Grid1Row.AddGrid("Gridcurso_profesores_materias", Gridcurso_profesores_materiasContainer);
         }
         if ( context.isAjaxRequest( ) )
         {
            GxWebStd.gx_hidden_field( context, "Gridcurso_profesores_materiasContainerData"+"V_"+sGXsfl_65_idx, Gridcurso_profesores_materiasContainer.GridValuesHidden());
         }
         else
         {
            context.WriteHtmlText( "<input type=\"hidden\" "+"name=\""+"Gridcurso_profesores_materiasContainerData"+"V_"+sGXsfl_65_idx+"\" value='"+Gridcurso_profesores_materiasContainer.GridValuesHidden()+"'>") ;
         }
         /* End of table */
         context.httpAjaxContext.ajax_sending_grid_row(Grid1Row);
         GXCCtl = "Z18ProfesorId_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z18ProfesorId), 4, 0, ",", "")));
         GXCCtl = "nRC_Gridcurso_profesores_materias_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nGXsfl_95_idx), 4, 0, ",", "")));
         GXCCtl = "nRcdDeleted_7_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_7), 4, 0, ",", "")));
         GXCCtl = "nRcdExists_7_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_7), 4, 0, ",", "")));
         GXCCtl = "nIsMod_7_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_7), 4, 0, ",", "")));
         GXCCtl = "vCURSOID_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7CursoId), 4, 0, ",", "")));
         GXCCtl = "vMODE_" + sGXsfl_65_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.RTrim( Gx_mode));
         GxWebStd.gx_hidden_field( context, "PROFESORID_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorId_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROFESORAPELLIDOS_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorApellidos_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROFESORNOMBRE_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombre_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROMPT_18_"+sGXsfl_65_idx+"Link", StringUtil.RTrim( imgprompt_18_Link));
         context.httpAjaxContext.ajax_sending_grid_row(null);
         GRIDCURSO_PROFESORES_MATERIAS_nFirstRecordOnPage = 0 ;
         GRIDCURSO_PROFESORES_MATERIAS_nCurrentRecord = 0 ;
         /* End of Columns property logic. */
         if ( Grid1Container.GetWrapped() == 1 )
         {
            if ( 3 > 0 )
            {
               if ( ((int)(nGXsfl_65_idx) % (3)) == 0 )
               {
                  context.WriteHtmlTextNl( "</tr>") ;
               }
            }
         }
         Grid1Container.AddRow(Grid1Row);
      }

      protected void ReadRow047( )
      {
         nGXsfl_65_idx = (short)(nGXsfl_65_idx+1) ;
         sGXsfl_65_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_65_idx), 4, 0)), 4, "0") ;
         lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
         edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
         lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
         edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
         lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
         imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
         subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         edtProfesorId_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORID_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
         edtProfesorApellidos_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORAPELLIDOS_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorApellidos_Enabled), 5, 0)));
         edtProfesorNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORNOMBRE_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombre_Enabled), 5, 0)));
         edtProfesorNombreCompleto_Enabled = (int)(context.localUtil.CToN( cgiGet( "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorNombreCompleto_Enabled), 5, 0)));
         imgprompt_15_Link = cgiGet( "PROMPT_18_"+sGXsfl_65_idx+"Link") ;
         if ( ! context.localUtil.VCNumber( cgiGet( edtProfesorId_Internalname), "ZZZ9") || ( context.localUtil.CToN( cgiGet( edtProfesorId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) || ( ( context.localUtil.CToN( cgiGet( edtProfesorId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
         {
            GX_msglist.addItem(context.GetMessage( "GXM_badnum"), 1, "PROFESORID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            wbErr = true ;
            A18ProfesorId = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
         }
         else
         {
            A18ProfesorId = (short)(context.localUtil.CToN( cgiGet( edtProfesorId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
         }
         A19ProfesorApellidos = cgiGet( edtProfesorApellidos_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
         A20ProfesorNombre = cgiGet( edtProfesorNombre_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
         A21ProfesorNombreCompleto = cgiGet( edtProfesorNombreCompleto_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A21ProfesorNombreCompleto", A21ProfesorNombreCompleto);
         GXCCtl = "Z18ProfesorId_" + sGXsfl_65_idx ;
         Z18ProfesorId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRC_Gridcurso_profesores_materias_" + sGXsfl_65_idx ;
         nRC_Gridcurso_profesores_materias = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdDeleted_7_" + sGXsfl_65_idx ;
         nRcdDeleted_7 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdExists_7_" + sGXsfl_65_idx ;
         nRcdExists_7 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nIsMod_7_" + sGXsfl_65_idx ;
         nIsMod_7 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "vCURSOID_" + sGXsfl_65_idx ;
         AV7CursoId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRC_Gridcurso_profesores_materias_" + sGXsfl_65_idx ;
         nRC_Gridcurso_profesores_materias = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
      }

      protected void AddRow048( )
      {
         nGXsfl_95_idx = (short)(nGXsfl_95_idx+1) ;
         sGXsfl_95_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_95_idx), 4, 0)), 4, "0") + sGXsfl_65_idx ;
         edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
         imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
         edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
         SendRow048( ) ;
      }

      protected void SendRow048( )
      {
         Gridcurso_profesores_materiasRow = GXWebRow.GetNew(context) ;
         if ( subGridcurso_profesores_materias_Backcolorstyle == 0 )
         {
            /* None style subfile background logic. */
            subGridcurso_profesores_materias_Backstyle = 0 ;
            if ( StringUtil.StrCmp(subGridcurso_profesores_materias_Class, "") != 0 )
            {
               subGridcurso_profesores_materias_Linesclass = subGridcurso_profesores_materias_Class+"Odd" ;
            }
         }
         else if ( subGridcurso_profesores_materias_Backcolorstyle == 1 )
         {
            /* Uniform style subfile background logic. */
            subGridcurso_profesores_materias_Backstyle = 0 ;
            subGridcurso_profesores_materias_Backcolor = subGridcurso_profesores_materias_Allbackcolor ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_profesores_materiasContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_profesores_materias_Backcolor), 9, 0)));
            if ( StringUtil.StrCmp(subGridcurso_profesores_materias_Class, "") != 0 )
            {
               subGridcurso_profesores_materias_Linesclass = subGridcurso_profesores_materias_Class+"Uniform" ;
            }
         }
         else if ( subGridcurso_profesores_materias_Backcolorstyle == 2 )
         {
            /* Header style subfile background logic. */
            subGridcurso_profesores_materias_Backstyle = 1 ;
            if ( StringUtil.StrCmp(subGridcurso_profesores_materias_Class, "") != 0 )
            {
               subGridcurso_profesores_materias_Linesclass = subGridcurso_profesores_materias_Class+"Odd" ;
            }
            subGridcurso_profesores_materias_Backcolor = (int)(0xFFFFFF) ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_profesores_materiasContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_profesores_materias_Backcolor), 9, 0)));
         }
         else if ( subGridcurso_profesores_materias_Backcolorstyle == 3 )
         {
            /* Report style subfile background logic. */
            subGridcurso_profesores_materias_Backstyle = 1 ;
            if ( ((int)(nGXsfl_95_idx) % (2)) == 0 )
            {
               subGridcurso_profesores_materias_Backcolor = (int)(0x0) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_profesores_materiasContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_profesores_materias_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGridcurso_profesores_materias_Class, "") != 0 )
               {
                  subGridcurso_profesores_materias_Linesclass = subGridcurso_profesores_materias_Class+"Even" ;
               }
            }
            else
            {
               subGridcurso_profesores_materias_Backcolor = (int)(0xFFFFFF) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_profesores_materiasContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_profesores_materias_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGridcurso_profesores_materias_Class, "") != 0 )
               {
                  subGridcurso_profesores_materias_Linesclass = subGridcurso_profesores_materias_Class+"Odd" ;
               }
            }
         }
         imgprompt_15_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0)||(StringUtil.StrCmp(Gx_mode, "UPD")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx0030.aspx"+"',["+"{Ctrl:gx.dom.el('"+"MATERIAID_"+sGXsfl_95_idx+"'), id:'"+"MATERIAID_"+sGXsfl_95_idx+"'"+",isOut:true,isKey:false,isLastKey:false}"+"],"+"gx.dom.form()."+"nIsMod_8_"+sGXsfl_95_idx+","+"'', false"+","+"false"+","+"false"+");") ;
         /* * Property Link not supported in */
         /* * Property Link not supported in */
         /* Subfile cell */
         /* Single line edit */
         TempTags = " gxoch1=\"gx.fn.setControlValue('nIsMod_8_" + sGXsfl_95_idx + "',1);gx.fn.setControlValue('nIsMod_7_" + sGXsfl_65_idx + "',1);\"  onfocus=\"gx.evt.onfocus(this, 96,'',false,'" + sGXsfl_95_idx + "',95)\"" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_profesores_materiasRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtMateriaId_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A15MateriaId), 4, 0, ",", "")),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)4,(short)-1,(int)edtMateriaId_Enabled,(short)1,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,context.localUtil.Format( (decimal)(A15MateriaId), "ZZZ9"),TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(96);\"",(short)0,(String)edtMateriaId_Jsonclick,(String)"",(short)95,(short)1,(short)-1,(bool)true,(String)"right"});
         /* Subfile cell */
         /* Static images/pictures */
         ClassString = "Image" ;
         StyleString = "" ;
         Gridcurso_profesores_materiasRow.AddColumnProperties("bitmap", 2, isAjaxCallMode( ), new Object[] {(String)imgprompt_15_Internalname,(String)"","prompt.gif",(String)"Classic",(int)imgprompt_15_Visible,(short)1,(String)"",(String)"",(short)0,(short)0,(short)0,(String)"",(short)0,(String)"",(short)0,(short)0,(String)imgprompt_15_Link,(String)"",(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)"",(String)"",(String)"''",(String)""});
         /* Subfile cell */
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_profesores_materiasRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtMateriaNombre_Internalname,StringUtil.RTrim( A16MateriaNombre),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)100,(short)-1,(int)edtMateriaNombre_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A16MateriaNombre, "")),(String)"",(short)0,(String)edtMateriaNombre_Jsonclick,(String)"",(short)95,(short)1,(short)-1,(bool)true,(String)"left"});
         context.httpAjaxContext.ajax_sending_grid_row(Gridcurso_profesores_materiasRow);
         GXCCtl = "Z15MateriaId_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z15MateriaId), 4, 0, ",", "")));
         GXCCtl = "nRcdDeleted_8_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_8), 4, 0, ",", "")));
         GXCCtl = "nRcdExists_8_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_8), 4, 0, ",", "")));
         GXCCtl = "nIsMod_8_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_8), 4, 0, ",", "")));
         GXCCtl = "vMODE_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.RTrim( Gx_mode));
         GXCCtl = "vCURSOID_" + sGXsfl_95_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7CursoId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "MATERIAID_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaId_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "MATERIANOMBRE_"+sGXsfl_95_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtMateriaNombre_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROMPT_15_"+sGXsfl_95_idx+"Link", StringUtil.RTrim( imgprompt_15_Link));
         context.httpAjaxContext.ajax_sending_grid_row(null);
         Gridcurso_profesores_materiasContainer.AddRow(Gridcurso_profesores_materiasRow);
      }

      protected void ReadRow048( )
      {
         nGXsfl_95_idx = (short)(nGXsfl_95_idx+1) ;
         sGXsfl_95_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_95_idx), 4, 0)), 4, "0") + sGXsfl_65_idx ;
         edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
         imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
         edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
         edtMateriaId_Enabled = (int)(context.localUtil.CToN( cgiGet( "MATERIAID_"+sGXsfl_95_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
         edtMateriaNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "MATERIANOMBRE_"+sGXsfl_95_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaNombre_Enabled), 5, 0)));
         imgprompt_15_Link = cgiGet( "PROMPT_15_"+sGXsfl_95_idx+"Link") ;
         if ( ! context.localUtil.VCNumber( cgiGet( edtMateriaId_Internalname), "ZZZ9") || ( context.localUtil.CToN( cgiGet( edtMateriaId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) || ( ( context.localUtil.CToN( cgiGet( edtMateriaId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
         {
            GX_msglist.addItem(context.GetMessage( "GXM_badnum"), 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtMateriaId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            wbErr = true ;
            A15MateriaId = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
         }
         else
         {
            A15MateriaId = (short)(context.localUtil.CToN( cgiGet( edtMateriaId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
         }
         A16MateriaNombre = cgiGet( edtMateriaNombre_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
         GXCCtl = "Z15MateriaId_" + sGXsfl_95_idx ;
         Z15MateriaId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdDeleted_8_" + sGXsfl_95_idx ;
         nRcdDeleted_8 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdExists_8_" + sGXsfl_95_idx ;
         nRcdExists_8 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nIsMod_8_" + sGXsfl_95_idx ;
         nIsMod_8 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "vCURSOID_" + sGXsfl_95_idx ;
         AV7CursoId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
      }

      protected void AddRow049( )
      {
         nGXsfl_104_idx = (short)(nGXsfl_104_idx+1) ;
         sGXsfl_104_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_104_idx), 4, 0)), 4, "0") ;
         edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
         imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
         edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
         edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
         edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
         SendRow049( ) ;
      }

      protected void SendRow049( )
      {
         Gridcurso_alumnosRow = GXWebRow.GetNew(context) ;
         if ( subGridcurso_alumnos_Backcolorstyle == 0 )
         {
            /* None style subfile background logic. */
            subGridcurso_alumnos_Backstyle = 0 ;
            if ( StringUtil.StrCmp(subGridcurso_alumnos_Class, "") != 0 )
            {
               subGridcurso_alumnos_Linesclass = subGridcurso_alumnos_Class+"Odd" ;
            }
         }
         else if ( subGridcurso_alumnos_Backcolorstyle == 1 )
         {
            /* Uniform style subfile background logic. */
            subGridcurso_alumnos_Backstyle = 0 ;
            subGridcurso_alumnos_Backcolor = subGridcurso_alumnos_Allbackcolor ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_alumnosContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_alumnos_Backcolor), 9, 0)));
            if ( StringUtil.StrCmp(subGridcurso_alumnos_Class, "") != 0 )
            {
               subGridcurso_alumnos_Linesclass = subGridcurso_alumnos_Class+"Uniform" ;
            }
         }
         else if ( subGridcurso_alumnos_Backcolorstyle == 2 )
         {
            /* Header style subfile background logic. */
            subGridcurso_alumnos_Backstyle = 1 ;
            if ( StringUtil.StrCmp(subGridcurso_alumnos_Class, "") != 0 )
            {
               subGridcurso_alumnos_Linesclass = subGridcurso_alumnos_Class+"Odd" ;
            }
            subGridcurso_alumnos_Backcolor = (int)(0xFFFFFF) ;
            context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_alumnosContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_alumnos_Backcolor), 9, 0)));
         }
         else if ( subGridcurso_alumnos_Backcolorstyle == 3 )
         {
            /* Report style subfile background logic. */
            subGridcurso_alumnos_Backstyle = 1 ;
            if ( ((int)(nGXsfl_104_idx) % (2)) == 0 )
            {
               subGridcurso_alumnos_Backcolor = (int)(0x0) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_alumnosContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_alumnos_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGridcurso_alumnos_Class, "") != 0 )
               {
                  subGridcurso_alumnos_Linesclass = subGridcurso_alumnos_Class+"Even" ;
               }
            }
            else
            {
               subGridcurso_alumnos_Backcolor = (int)(0xFFFFFF) ;
               context.httpAjaxContext.ajax_rsp_assign_prop("", false, "Gridcurso_alumnosContainerDiv", "Backcolor", StringUtil.LTrim( StringUtil.Str( (decimal)(subGridcurso_alumnos_Backcolor), 9, 0)));
               if ( StringUtil.StrCmp(subGridcurso_alumnos_Class, "") != 0 )
               {
                  subGridcurso_alumnos_Linesclass = subGridcurso_alumnos_Class+"Odd" ;
               }
            }
         }
         imgprompt_1_Link = ((StringUtil.StrCmp(Gx_mode, "DSP")==0)||(StringUtil.StrCmp(Gx_mode, "UPD")==0) ? "" : "javascript:"+"gx.popup.openPrompt('"+"gx0010.aspx"+"',["+"{Ctrl:gx.dom.el('"+"ALUMNOID_"+sGXsfl_104_idx+"'), id:'"+"ALUMNOID_"+sGXsfl_104_idx+"'"+",isOut:true,isKey:false,isLastKey:false}"+"],"+"gx.dom.form()."+"nIsMod_9_"+sGXsfl_104_idx+","+"'', false"+","+"false"+","+"false"+");") ;
         /* * Property Link not supported in */
         /* * Property Link not supported in */
         /* Subfile cell */
         /* Single line edit */
         TempTags = " gxoch1=\"gx.fn.setControlValue('nIsMod_9_" + sGXsfl_104_idx + "',1);\"  onfocus=\"gx.evt.onfocus(this, 105,'',false,'" + sGXsfl_104_idx + "',104)\"" ;
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_alumnosRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtAlumnoId_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A1AlumnoId), 4, 0, ",", "")),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)4,(short)-1,(int)edtAlumnoId_Enabled,(short)1,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,context.localUtil.Format( (decimal)(A1AlumnoId), "ZZZ9"),TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,'.');"+";gx.evt.onblur(105);\"",(short)0,(String)edtAlumnoId_Jsonclick,(String)"",(short)104,(short)1,(short)-1,(bool)true,(String)"right"});
         /* Subfile cell */
         /* Static images/pictures */
         ClassString = "Image" ;
         StyleString = "" ;
         Gridcurso_alumnosRow.AddColumnProperties("bitmap", 2, isAjaxCallMode( ), new Object[] {(String)imgprompt_1_Internalname,(String)"","prompt.gif",(String)"Classic",(int)imgprompt_1_Visible,(short)1,(String)"",(String)"",(short)0,(short)0,(short)0,(String)"",(short)0,(String)"",(short)0,(short)0,(String)imgprompt_1_Link,(String)"",(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)"",(String)"",(String)"''",(String)""});
         /* Subfile cell */
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_alumnosRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtAlumnoNombre_Internalname,StringUtil.RTrim( A2AlumnoNombre),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)100,(short)-1,(int)edtAlumnoNombre_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A2AlumnoNombre, "")),(String)"",(short)0,(String)edtAlumnoNombre_Jsonclick,(String)"",(short)104,(short)1,(short)-1,(bool)true,(String)"left"});
         /* Subfile cell */
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_alumnosRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtAlumnoApellidos_Internalname,StringUtil.RTrim( A3AlumnoApellidos),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)120,(short)-1,(int)edtAlumnoApellidos_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A3AlumnoApellidos, "")),(String)"",(short)0,(String)edtAlumnoApellidos_Jsonclick,(String)"",(short)104,(short)1,(short)-1,(bool)true,(String)"left"});
         /* Subfile cell */
         /* Single line edit */
         ClassString = "Attribute" ;
         StyleString = "" ;
         ROClassString = ClassString ;
         Gridcurso_alumnosRow.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtAlumnoNombreCompleto_Internalname,StringUtil.RTrim( A4AlumnoNombreCompleto),(String)"",(short)0,(String)"px",(short)17,(String)"",(short)220,(short)-1,(int)edtAlumnoNombreCompleto_Enabled,(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)ROClassString,StringUtil.RTrim( context.localUtil.Format( A4AlumnoNombreCompleto, "")),(String)"",(short)0,(String)edtAlumnoNombreCompleto_Jsonclick,(String)"",(short)104,(short)1,(short)-1,(bool)true,(String)"left"});
         context.httpAjaxContext.ajax_sending_grid_row(Gridcurso_alumnosRow);
         GXCCtl = "Z1AlumnoId_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(Z1AlumnoId), 4, 0, ",", "")));
         GXCCtl = "nRcdDeleted_9_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdDeleted_9), 4, 0, ",", "")));
         GXCCtl = "nRcdExists_9_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nRcdExists_9), 4, 0, ",", "")));
         GXCCtl = "nIsMod_9_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(nIsMod_9), 4, 0, ",", "")));
         GXCCtl = "vMODE_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.RTrim( Gx_mode));
         GXCCtl = "vCURSOID_" + sGXsfl_104_idx ;
         GxWebStd.gx_hidden_field( context, GXCCtl, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7CursoId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "ALUMNOID_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoId_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "ALUMNONOMBRE_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombre_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "ALUMNOAPELLIDOS_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoApellidos_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx+"Enabled", StringUtil.LTrim( StringUtil.NToC( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "PROMPT_1_"+sGXsfl_104_idx+"Link", StringUtil.RTrim( imgprompt_1_Link));
         context.httpAjaxContext.ajax_sending_grid_row(null);
         Gridcurso_alumnosContainer.AddRow(Gridcurso_alumnosRow);
      }

      protected void ReadRow049( )
      {
         nGXsfl_104_idx = (short)(nGXsfl_104_idx+1) ;
         sGXsfl_104_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_104_idx), 4, 0)), 4, "0") ;
         edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
         imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
         edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
         edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
         edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
         edtAlumnoId_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNOID_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
         edtAlumnoNombre_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNONOMBRE_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombre_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombre_Enabled), 5, 0)));
         edtAlumnoApellidos_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNOAPELLIDOS_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoApellidos_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoApellidos_Enabled), 5, 0)));
         edtAlumnoNombreCompleto_Enabled = (int)(context.localUtil.CToN( cgiGet( "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx+"Enabled"), ",", ".")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoNombreCompleto_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoNombreCompleto_Enabled), 5, 0)));
         imgprompt_15_Link = cgiGet( "PROMPT_1_"+sGXsfl_104_idx+"Link") ;
         if ( ! context.localUtil.VCNumber( cgiGet( edtAlumnoId_Internalname), "ZZZ9") || ( context.localUtil.CToN( cgiGet( edtAlumnoId_Internalname), ",", ".") < Convert.ToDecimal( 0 )) || ( ( context.localUtil.CToN( cgiGet( edtAlumnoId_Internalname), ",", ".") > Convert.ToDecimal( 9999 )) ) )
         {
            GX_msglist.addItem(context.GetMessage( "GXM_badnum"), 1, "ALUMNOID");
            AnyError = 1 ;
            GX_FocusControl = edtAlumnoId_Internalname ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            wbErr = true ;
            A1AlumnoId = 0 ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
         }
         else
         {
            A1AlumnoId = (short)(context.localUtil.CToN( cgiGet( edtAlumnoId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
         }
         A2AlumnoNombre = cgiGet( edtAlumnoNombre_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
         A3AlumnoApellidos = cgiGet( edtAlumnoApellidos_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
         A4AlumnoNombreCompleto = cgiGet( edtAlumnoNombreCompleto_Internalname) ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A4AlumnoNombreCompleto", A4AlumnoNombreCompleto);
         GXCCtl = "Z1AlumnoId_" + sGXsfl_104_idx ;
         Z1AlumnoId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdDeleted_9_" + sGXsfl_104_idx ;
         nRcdDeleted_9 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nRcdExists_9_" + sGXsfl_104_idx ;
         nRcdExists_9 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "nIsMod_9_" + sGXsfl_104_idx ;
         nIsMod_9 = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
         GXCCtl = "vCURSOID_" + sGXsfl_104_idx ;
         AV7CursoId = (short)(context.localUtil.CToN( cgiGet( GXCCtl), ",", ".")) ;
      }

      protected void assign_properties_default( )
      {
         defedtMateriaId_Enabled = edtMateriaId_Enabled ;
         defedtAlumnoId_Enabled = edtAlumnoId_Enabled ;
         defedtProfesorId_Enabled = edtProfesorId_Enabled ;
      }

      protected void ConfirmValues040( )
      {
         nGXsfl_95_idx = 0 ;
         sGXsfl_95_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_95_idx), 4, 0)), 4, "0") + sGXsfl_65_idx ;
         edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
         imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
         edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
         while ( nGXsfl_95_idx < nRC_Gridcurso_profesores_materias )
         {
            nGXsfl_95_idx = (short)(nGXsfl_95_idx+1) ;
            sGXsfl_95_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_95_idx), 4, 0)), 4, "0") + sGXsfl_65_idx ;
            edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
            imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
            edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
            ChangePostValue( "Z15MateriaId_"+sGXsfl_95_idx, cgiGet( "ZT_"+"Z15MateriaId_"+sGXsfl_95_idx)) ;
            DeletePostValue( "ZT_"+"Z15MateriaId_"+sGXsfl_95_idx) ;
         }
         nGXsfl_65_idx = 0 ;
         sGXsfl_65_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_65_idx), 4, 0)), 4, "0") ;
         lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
         edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
         lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
         edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
         lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
         imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
         subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         while ( nGXsfl_65_idx < nRC_Grid1 )
         {
            nGXsfl_65_idx = (short)(nGXsfl_65_idx+1) ;
            sGXsfl_65_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_65_idx), 4, 0)), 4, "0") ;
            lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
            edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
            lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
            edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
            lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
            edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
            lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
            edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
            lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
            imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
            subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
            ChangePostValue( "Z18ProfesorId_"+sGXsfl_65_idx, cgiGet( "ZT_"+"Z18ProfesorId_"+sGXsfl_65_idx)) ;
            DeletePostValue( "ZT_"+"Z18ProfesorId_"+sGXsfl_65_idx) ;
         }
         nGXsfl_104_idx = 0 ;
         sGXsfl_104_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_104_idx), 4, 0)), 4, "0") ;
         edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
         imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
         edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
         edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
         edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
         while ( nGXsfl_104_idx < nRC_Gridcurso_alumnos )
         {
            nGXsfl_104_idx = (short)(nGXsfl_104_idx+1) ;
            sGXsfl_104_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_104_idx), 4, 0)), 4, "0") ;
            edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
            imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
            edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
            edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
            edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
            ChangePostValue( "Z1AlumnoId_"+sGXsfl_104_idx, cgiGet( "ZT_"+"Z1AlumnoId_"+sGXsfl_104_idx)) ;
            DeletePostValue( "ZT_"+"Z1AlumnoId_"+sGXsfl_104_idx) ;
         }
      }

      public override void RenderHtmlHeaders( )
      {
         GxWebStd.gx_html_headers( context, 0, "", "", Form.Meta, Form.Metaequiv, "IE=EmulateIE7");
      }

      public override void RenderHtmlOpenForm( )
      {
         context.WriteHtmlText( "<title>") ;
         context.WriteHtmlText( Form.Caption) ;
         context.WriteHtmlTextNl( "</title>") ;
         if ( StringUtil.Len( sDynURL) > 0 )
         {
            context.WriteHtmlText( "<BASE href=\""+sDynURL+"\" />") ;
         }
         define_styles( ) ;
         MasterPageObj.master_styles();
         if ( ! context.isSmartDevice( ) )
         {
            context.AddJavascriptSource("gxgral.js", "?42940");
            context.AddJavascriptSource("gxcfg.js", "?42940");
         }
         else
         {
            context.AddJavascriptSource("gxapiSD.js", "?42940");
            context.AddJavascriptSource("gxfxSD.js", "?42940");
            context.AddJavascriptSource("gxtypesSD.js", "?42940");
            context.AddJavascriptSource("gxpopupSD.js", "?42940");
            context.AddJavascriptSource("gxfrmutlSD.js", "?42940");
            context.AddJavascriptSource("gxgridSD.js", "?42940");
            context.AddJavascriptSource("JavaScripTableSD.js", "?42940");
            context.AddJavascriptSource("rijndaelSD.js", "?42940");
            context.AddJavascriptSource("gxgralSD.js", "?42940");
            context.AddJavascriptSource("gxcfg.js", "?42940");
         }
         context.WriteHtmlText( Form.Headerrawhtml) ;
         context.CloseHtmlHeader();
         FormProcess = " onkeyup=\"gx.evt.onkeyup(event)\" onkeypress=\"gx.evt.onkeypress(event,true,false)\" onkeydown=\"gx.evt.onkeypress(null,true,false)\"" ;
         context.WriteHtmlText( "<body") ;
         if ( ! ( String.IsNullOrEmpty(StringUtil.RTrim( Form.Background)) ) )
         {
            context.WriteHtmlText( " background=\""+context.convertURL( Form.Background)+"\"") ;
         }
         context.WriteHtmlText( " "+"class=\"Form\""+" "+" style=\"-moz-opacity:0;opacity:0;"+"background-color:"+context.BuildHTMLColor( Form.Backcolor)+"\""+FormProcess+">") ;
         context.skipLines(1);
         context.WriteHtmlTextNl( "<form id=\"MAINFORM\" onsubmit=\"try{return gx.csv.validForm()}catch(e){return true;}\" name=\"MAINFORM\" method=\"post\" action=\""+formatLink("curso.aspx") + "?" + UrlEncode(StringUtil.RTrim(Gx_mode)) + "," + UrlEncode("" +AV7CursoId)+"\" class=\""+"Form"+"\">") ;
         GxWebStd.gx_hidden_field( context, "_EventName", "");
         GxWebStd.gx_hidden_field( context, "_EventGridId", "");
         GxWebStd.gx_hidden_field( context, "_EventRowId", "");
      }

      public override void RenderHtmlCloseForm( )
      {
         /* Send hidden variables. */
         /* Send saved values. */
         GxWebStd.gx_hidden_field( context, "Z25CursoId", StringUtil.LTrim( StringUtil.NToC( (decimal)(Z25CursoId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "Z26CursoNombre", StringUtil.RTrim( Z26CursoNombre));
         GxWebStd.gx_hidden_field( context, "Z28CursoAula", StringUtil.RTrim( Z28CursoAula));
         GxWebStd.gx_hidden_field( context, "Z29CursoDescripcion", StringUtil.RTrim( Z29CursoDescripcion));
         GxWebStd.gx_hidden_field( context, "IsConfirmed", StringUtil.LTrim( StringUtil.NToC( (decimal)(IsConfirmed), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "IsModified", StringUtil.LTrim( StringUtil.NToC( (decimal)(IsModified), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "Mode", StringUtil.RTrim( Gx_mode));
         GxWebStd.gx_hidden_field( context, "nRC_Grid1", StringUtil.LTrim( StringUtil.NToC( (decimal)(nGXsfl_65_idx), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "nRC_Gridcurso_alumnos", StringUtil.LTrim( StringUtil.NToC( (decimal)(nGXsfl_104_idx), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vCURSOID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7CursoId), 4, 0, ",", "")));
         GxWebStd.gx_hidden_field( context, "vPGMNAME", StringUtil.RTrim( AV12Pgmname));
         GxWebStd.gx_hidden_field( context, "vMODE", StringUtil.RTrim( Gx_mode));
         GxWebStd.gx_hidden_field( context, "GX_FocusControl", GX_FocusControl);
         SendAjaxEncryptionKey();
         SendComponentObjects();
         SendServerCommands();
         SendState();
         context.WriteHtmlTextNl( "</form>") ;
         include_jscripts( ) ;
      }

      public override short ExecuteStartEvent( )
      {
         standaloneStartup( ) ;
         gxajaxcallmode = (short)((isAjaxCallMode( ) ? 1 : 0)) ;
         return gxajaxcallmode ;
      }

      public override void RenderHtmlContent( )
      {
         Draw( ) ;
      }

      public override void DispatchEvents( )
      {
         Process( ) ;
      }

      public override bool HasEnterEvent( )
      {
         return true ;
      }

      public override String GetPgmname( )
      {
         return "Curso" ;
      }

      public override String GetPgmdesc( )
      {
         return "Curso" ;
      }

      public override GXWebForm GetForm( )
      {
         return Form ;
      }

      public override String GetSelfLink( )
      {
         return formatLink("curso.aspx") + "?" + UrlEncode(StringUtil.RTrim(Gx_mode)) + "," + UrlEncode("" +AV7CursoId) ;
      }

      protected void InitializeNonKey046( )
      {
         A26CursoNombre = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A26CursoNombre", A26CursoNombre);
         A27CursoNumeroAlumnos = 0 ;
         n27CursoNumeroAlumnos = false ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A27CursoNumeroAlumnos", StringUtil.LTrim( StringUtil.Str( (decimal)(A27CursoNumeroAlumnos), 4, 0)));
         A28CursoAula = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A28CursoAula", A28CursoAula);
         A29CursoDescripcion = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A29CursoDescripcion", A29CursoDescripcion);
      }

      protected void InitAll046( )
      {
         A25CursoId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A25CursoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A25CursoId), 4, 0)));
         InitializeNonKey046( ) ;
      }

      protected void StandaloneModalInsert( )
      {
      }

      protected void InitializeNonKey047( )
      {
         A21ProfesorNombreCompleto = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A21ProfesorNombreCompleto", A21ProfesorNombreCompleto);
         A19ProfesorApellidos = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A19ProfesorApellidos", A19ProfesorApellidos);
         A20ProfesorNombre = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A20ProfesorNombre", A20ProfesorNombre);
      }

      protected void InitAll047( )
      {
         A18ProfesorId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A18ProfesorId", StringUtil.LTrim( StringUtil.Str( (decimal)(A18ProfesorId), 4, 0)));
         InitializeNonKey047( ) ;
      }

      protected void StandaloneModalInsert047( )
      {
      }

      protected void InitializeNonKey048( )
      {
         A16MateriaNombre = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A16MateriaNombre", A16MateriaNombre);
      }

      protected void InitAll048( )
      {
         A15MateriaId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A15MateriaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A15MateriaId), 4, 0)));
         InitializeNonKey048( ) ;
      }

      protected void StandaloneModalInsert048( )
      {
      }

      protected void InitializeNonKey049( )
      {
         A4AlumnoNombreCompleto = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A4AlumnoNombreCompleto", A4AlumnoNombreCompleto);
         A2AlumnoNombre = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A2AlumnoNombre", A2AlumnoNombre);
         A3AlumnoApellidos = "" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A3AlumnoApellidos", A3AlumnoApellidos);
      }

      protected void InitAll049( )
      {
         A1AlumnoId = 0 ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "A1AlumnoId", StringUtil.LTrim( StringUtil.Str( (decimal)(A1AlumnoId), 4, 0)));
         InitializeNonKey049( ) ;
      }

      protected void StandaloneModalInsert049( )
      {
      }

      protected void define_styles( )
      {
         AddThemeStyleSheetFile("", "Classic.css", "?1033786");
         idxLst = 1 ;
         while ( idxLst <= Form.Jscriptsrc.Count )
         {
            context.AddJavascriptSource(StringUtil.RTrim( Form.Jscriptsrc.Item(idxLst)), "?104685");
            idxLst = (int)(idxLst+1) ;
         }
         /* End function define_styles */
      }

      protected void include_jscripts( )
      {
         context.AddJavascriptSource("messages.spa.js", "?42940");
         context.AddJavascriptSource("curso.js", "?104685");
         /* End function include_jscripts */
      }

      protected void init_level_properties7( )
      {
         edtProfesorId_Enabled = defedtProfesorId_Enabled ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtProfesorId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtProfesorId_Enabled), 5, 0)));
      }

      protected void init_level_properties8( )
      {
         edtMateriaId_Enabled = defedtMateriaId_Enabled ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtMateriaId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtMateriaId_Enabled), 5, 0)));
      }

      protected void init_level_properties9( )
      {
         edtAlumnoId_Enabled = defedtAlumnoId_Enabled ;
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, edtAlumnoId_Internalname, "Enabled", StringUtil.LTrim( StringUtil.Str( (decimal)(edtAlumnoId_Enabled), 5, 0)));
      }

      protected void init_default_properties( )
      {
         imgBtn_first_Internalname = "BTN_FIRST" ;
         imgBtn_first_separator_Internalname = "BTN_FIRST_SEPARATOR" ;
         imgBtn_previous_Internalname = "BTN_PREVIOUS" ;
         imgBtn_previous_separator_Internalname = "BTN_PREVIOUS_SEPARATOR" ;
         imgBtn_next_Internalname = "BTN_NEXT" ;
         imgBtn_next_separator_Internalname = "BTN_NEXT_SEPARATOR" ;
         imgBtn_last_Internalname = "BTN_LAST" ;
         imgBtn_last_separator_Internalname = "BTN_LAST_SEPARATOR" ;
         imgBtn_select_Internalname = "BTN_SELECT" ;
         imgBtn_select_separator_Internalname = "BTN_SELECT_SEPARATOR" ;
         imgBtn_enter2_Internalname = "BTN_ENTER2" ;
         imgBtn_enter2_separator_Internalname = "BTN_ENTER2_SEPARATOR" ;
         imgBtn_cancel2_Internalname = "BTN_CANCEL2" ;
         imgBtn_cancel2_separator_Internalname = "BTN_CANCEL2_SEPARATOR" ;
         imgBtn_delete2_Internalname = "BTN_DELETE2" ;
         imgBtn_delete2_separator_Internalname = "BTN_DELETE2_SEPARATOR" ;
         tblTabletoolbar_Internalname = "TABLETOOLBAR" ;
         lblTextblockcursoid_Internalname = "TEXTBLOCKCURSOID" ;
         edtCursoId_Internalname = "CURSOID" ;
         lblTextblockcursonombre_Internalname = "TEXTBLOCKCURSONOMBRE" ;
         edtCursoNombre_Internalname = "CURSONOMBRE" ;
         lblTextblockcursonumeroalumnos_Internalname = "TEXTBLOCKCURSONUMEROALUMNOS" ;
         edtCursoNumeroAlumnos_Internalname = "CURSONUMEROALUMNOS" ;
         lblTextblockcursoaula_Internalname = "TEXTBLOCKCURSOAULA" ;
         edtCursoAula_Internalname = "CURSOAULA" ;
         lblTextblockcursodescripcion_Internalname = "TEXTBLOCKCURSODESCRIPCION" ;
         edtCursoDescripcion_Internalname = "CURSODESCRIPCION" ;
         lblTitleprofesores_Internalname = "TITLEPROFESORES" ;
         tblTable3_Internalname = "TABLE3" ;
         tblTable5_Internalname = "TABLE5" ;
         tblTable4_Internalname = "TABLE4" ;
         lblTitlealumnos_Internalname = "TITLEALUMNOS" ;
         tblTable6_Internalname = "TABLE6" ;
         tblTable2_Internalname = "TABLE2" ;
         bttBtn_enter_Internalname = "BTN_ENTER" ;
         bttBtn_cancel_Internalname = "BTN_CANCEL" ;
         bttBtn_delete_Internalname = "BTN_DELETE" ;
         tblTable1_Internalname = "TABLE1" ;
         grpGroupdata_Internalname = "GROUPDATA" ;
         tblTablemain_Internalname = "TABLEMAIN" ;
         Form.Internalname = "FORM" ;
         subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         subGrid1_Internalname = "GRID1" ;
         subGridcurso_alumnos_Internalname = "GRIDCURSO_ALUMNOS" ;
      }

      public override void initialize_properties( )
      {
         init_default_properties( ) ;
         Form.Headerrawhtml = "" ;
         Form.Background = "" ;
         Form.Backcolor = (int)(0xFFFFFF) ;
         Form.Caption = "Curso" ;
         edtAlumnoNombreCompleto_Jsonclick = "" ;
         edtAlumnoApellidos_Jsonclick = "" ;
         edtAlumnoNombre_Jsonclick = "" ;
         imgprompt_1_Visible = 1 ;
         imgprompt_1_Link = "" ;
         edtAlumnoId_Jsonclick = "" ;
         subGridcurso_alumnos_Class = "Grid" ;
         edtMateriaNombre_Jsonclick = "" ;
         imgprompt_15_Visible = 1 ;
         imgprompt_15_Link = "" ;
         imgprompt_15_Visible = 1 ;
         edtMateriaId_Jsonclick = "" ;
         subGridcurso_profesores_materias_Class = "Grid" ;
         subGridcurso_profesores_materias_Backcolorstyle = 2 ;
         edtProfesorNombre_Jsonclick = "" ;
         edtProfesorApellidos_Jsonclick = "" ;
         imgprompt_18_Visible = 1 ;
         imgprompt_18_Link = "" ;
         edtProfesorId_Jsonclick = "" ;
         subGrid1_Class = "FreeStyleGrid" ;
         edtMateriaNombre_Enabled = 0 ;
         edtMateriaId_Enabled = 1 ;
         imgBtn_delete2_separator_Visible = 1 ;
         imgBtn_delete2_Enabled = 1 ;
         imgBtn_delete2_Visible = 1 ;
         imgBtn_cancel2_separator_Visible = 1 ;
         imgBtn_cancel2_Visible = 1 ;
         imgBtn_enter2_separator_Visible = 1 ;
         imgBtn_enter2_Enabled = 1 ;
         imgBtn_enter2_Visible = 1 ;
         imgBtn_select_separator_Visible = 1 ;
         imgBtn_select_Visible = 1 ;
         imgBtn_last_separator_Visible = 1 ;
         imgBtn_last_Visible = 1 ;
         imgBtn_next_separator_Visible = 1 ;
         imgBtn_next_Visible = 1 ;
         imgBtn_previous_separator_Visible = 1 ;
         imgBtn_previous_Visible = 1 ;
         imgBtn_first_separator_Visible = 1 ;
         imgBtn_first_Visible = 1 ;
         edtAlumnoNombreCompleto_Enabled = 0 ;
         edtAlumnoApellidos_Enabled = 0 ;
         edtAlumnoNombre_Enabled = 0 ;
         edtAlumnoId_Enabled = 1 ;
         subGridcurso_alumnos_Backcolorstyle = 2 ;
         lblTitlematerias_Caption = "Materias" ;
         edtProfesorNombreCompleto_Enabled = 0 ;
         lblTextblockprofesornombrecompleto_Caption = "Profesor Nombre Completo" ;
         edtProfesorNombre_Enabled = 0 ;
         lblTextblockprofesornombre_Caption = "Profesor Nombre" ;
         edtProfesorApellidos_Enabled = 0 ;
         lblTextblockprofesorapellidos_Caption = "Profesor Apellidos" ;
         edtProfesorId_Enabled = 1 ;
         lblTextblockprofesorid_Caption = "Profesor Id" ;
         subGrid1_Borderwidth = 1 ;
         subGrid1_Backcolorstyle = 0 ;
         edtCursoDescripcion_Enabled = 1 ;
         edtCursoAula_Jsonclick = "" ;
         edtCursoAula_Enabled = 1 ;
         edtCursoNumeroAlumnos_Jsonclick = "" ;
         edtCursoNumeroAlumnos_Enabled = 0 ;
         edtCursoNombre_Jsonclick = "" ;
         edtCursoNombre_Enabled = 1 ;
         edtCursoId_Jsonclick = "" ;
         edtCursoId_Enabled = 0 ;
         bttBtn_delete_Visible = 1 ;
         bttBtn_cancel_Visible = 1 ;
         bttBtn_enter_Visible = 1 ;
         context.GX_msglist.DisplayMode = 1 ;
      }

      protected void dynload_actions( )
      {
         /* End function dynload_actions */
      }

      protected void gxnrGrid1_newrow( short nRC_Grid1 ,
                                       short nGXsfl_65_idx ,
                                       String sGXsfl_65_idx )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         Gx_mode = "INS" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
         edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
         lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
         lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
         edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
         lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
         lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
         imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
         subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         while ( nGXsfl_65_idx <= nRC_Grid1 )
         {
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            standaloneNotModal047( ) ;
            standaloneModal047( ) ;
            dynload_actions( ) ;
            SendRow047( ) ;
            Grid1Row.AddGrid("Gridcurso_profesores_materias", Gridcurso_profesores_materiasContainer);
            nGXsfl_65_idx = (short)(nGXsfl_65_idx+1) ;
            sGXsfl_65_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_65_idx), 4, 0)), 4, "0") ;
            lblTextblockprofesorid_Internalname = "TEXTBLOCKPROFESORID_"+sGXsfl_65_idx ;
            edtProfesorId_Internalname = "PROFESORID_"+sGXsfl_65_idx ;
            lblTextblockprofesorapellidos_Internalname = "TEXTBLOCKPROFESORAPELLIDOS_"+sGXsfl_65_idx ;
            edtProfesorApellidos_Internalname = "PROFESORAPELLIDOS_"+sGXsfl_65_idx ;
            lblTextblockprofesornombre_Internalname = "TEXTBLOCKPROFESORNOMBRE_"+sGXsfl_65_idx ;
            edtProfesorNombre_Internalname = "PROFESORNOMBRE_"+sGXsfl_65_idx ;
            lblTextblockprofesornombrecompleto_Internalname = "TEXTBLOCKPROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
            edtProfesorNombreCompleto_Internalname = "PROFESORNOMBRECOMPLETO_"+sGXsfl_65_idx ;
            lblTitlematerias_Internalname = "TITLEMATERIAS_"+sGXsfl_65_idx ;
            imgprompt_18_Internalname = "PROMPT_18_"+sGXsfl_65_idx ;
            subGridcurso_profesores_materias_Internalname = "GRIDCURSO_PROFESORES_MATERIAS_"+sGXsfl_65_idx ;
         }
         context.GX_webresponse.AddString(Grid1Container.ToJavascriptSource());
         /* End function gxnrGrid1_newrow */
      }

      protected void gxnrGridcurso_profesores_materias_newrow( short nRC_Gridcurso_profesores_materias ,
                                                               short nGXsfl_95_idx ,
                                                               String sGXsfl_95_idx )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         Gx_mode = "INS" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
         imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
         edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
         while ( nGXsfl_95_idx <= nRC_Gridcurso_profesores_materias )
         {
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            standaloneNotModal047( ) ;
            standaloneModal047( ) ;
            standaloneNotModal048( ) ;
            standaloneModal048( ) ;
            dynload_actions( ) ;
            SendRow048( ) ;
            nGXsfl_95_idx = (short)(nGXsfl_95_idx+1) ;
            sGXsfl_95_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_95_idx), 4, 0)), 4, "0") + sGXsfl_65_idx ;
            edtMateriaId_Internalname = "MATERIAID_"+sGXsfl_95_idx ;
            imgprompt_15_Internalname = "PROMPT_15_"+sGXsfl_95_idx ;
            edtMateriaNombre_Internalname = "MATERIANOMBRE_"+sGXsfl_95_idx ;
         }
         context.GX_webresponse.AddString(Gridcurso_profesores_materiasContainer.ToJavascriptSource());
         /* End function gxnrGridcurso_profesores_materias_newrow */
      }

      protected void gxnrGridcurso_alumnos_newrow( short nRC_Gridcurso_alumnos ,
                                                   short nGXsfl_104_idx ,
                                                   String sGXsfl_104_idx )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         Gx_mode = "INS" ;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "Gx_mode", Gx_mode);
         edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
         imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
         edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
         edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
         edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
         while ( nGXsfl_104_idx <= nRC_Gridcurso_alumnos )
         {
            standaloneNotModal( ) ;
            standaloneModal( ) ;
            standaloneNotModal049( ) ;
            standaloneModal049( ) ;
            dynload_actions( ) ;
            SendRow049( ) ;
            nGXsfl_104_idx = (short)(nGXsfl_104_idx+1) ;
            sGXsfl_104_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_104_idx), 4, 0)), 4, "0") ;
            edtAlumnoId_Internalname = "ALUMNOID_"+sGXsfl_104_idx ;
            imgprompt_1_Internalname = "PROMPT_1_"+sGXsfl_104_idx ;
            edtAlumnoNombre_Internalname = "ALUMNONOMBRE_"+sGXsfl_104_idx ;
            edtAlumnoApellidos_Internalname = "ALUMNOAPELLIDOS_"+sGXsfl_104_idx ;
            edtAlumnoNombreCompleto_Internalname = "ALUMNONOMBRECOMPLETO_"+sGXsfl_104_idx ;
         }
         context.GX_webresponse.AddString(Gridcurso_alumnosContainer.ToJavascriptSource());
         /* End function gxnrGridcurso_alumnos_newrow */
      }

      public void Valid_Cursoid( short GX_Parm1 ,
                                 short GX_Parm2 )
      {
         A25CursoId = GX_Parm1 ;
         A27CursoNumeroAlumnos = GX_Parm2 ;
         n27CursoNumeroAlumnos = false ;
         /* Using cursor T000429 */
         pr_default.execute(23, new Object[] {A25CursoId});
         if ( (pr_default.getStatus(23) != 101) )
         {
            A27CursoNumeroAlumnos = T000429_A27CursoNumeroAlumnos[0] ;
            n27CursoNumeroAlumnos = T000429_n27CursoNumeroAlumnos[0] ;
         }
         else
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
         }
         pr_default.close(23);
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A27CursoNumeroAlumnos = 0 ;
            n27CursoNumeroAlumnos = false ;
         }
         isValidOutput.Add((Object)(StringUtil.LTrim( StringUtil.NToC( (decimal)(A27CursoNumeroAlumnos), 4, 0, ".", ""))));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
      }

      public void Valid_Profesorid( short GX_Parm1 ,
                                    String GX_Parm2 ,
                                    String GX_Parm3 ,
                                    String GX_Parm4 )
      {
         A18ProfesorId = GX_Parm1 ;
         A20ProfesorNombre = GX_Parm2 ;
         A19ProfesorApellidos = GX_Parm3 ;
         A21ProfesorNombreCompleto = GX_Parm4 ;
         /* Using cursor T000437 */
         pr_default.execute(31, new Object[] {A18ProfesorId});
         if ( (pr_default.getStatus(31) == 101) )
         {
            GX_msglist.addItem("No existe 'Profesor'.", "ForeignKeyNotFound", 1, "PROFESORID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
         }
         if ( AnyError == 0 )
         {
            A19ProfesorApellidos = T000437_A19ProfesorApellidos[0] ;
            A20ProfesorNombre = T000437_A20ProfesorNombre[0] ;
         }
         pr_default.close(31);
         A21ProfesorNombreCompleto = A20ProfesorNombre + " " + A19ProfesorApellidos ;
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A19ProfesorApellidos = "" ;
            A20ProfesorNombre = "" ;
         }
         isValidOutput.Add((Object)(StringUtil.RTrim( A19ProfesorApellidos)));
         isValidOutput.Add((Object)(StringUtil.RTrim( A20ProfesorNombre)));
         isValidOutput.Add((Object)(StringUtil.RTrim( A21ProfesorNombreCompleto)));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
      }

      public void Valid_Materiaid( short GX_Parm1 ,
                                   short GX_Parm2 ,
                                   String GX_Parm3 )
      {
         A15MateriaId = GX_Parm1 ;
         A18ProfesorId = GX_Parm2 ;
         A16MateriaNombre = GX_Parm3 ;
         /* Using cursor T000445 */
         pr_default.execute(39, new Object[] {A15MateriaId});
         if ( (pr_default.getStatus(39) == 101) )
         {
            GX_msglist.addItem("No existe 'Materia'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtMateriaId_Internalname ;
         }
         if ( AnyError == 0 )
         {
            A16MateriaNombre = T000445_A16MateriaNombre[0] ;
         }
         pr_default.close(39);
         /* Using cursor T000454 */
         pr_default.execute(48, new Object[] {A18ProfesorId, A15MateriaId});
         if ( (pr_default.getStatus(48) == 101) )
         {
            GX_msglist.addItem("No existe 'Imparte'.", "ForeignKeyNotFound", 1, "MATERIAID");
            AnyError = 1 ;
            GX_FocusControl = edtProfesorId_Internalname ;
         }
         if ( AnyError == 0 )
         {
         }
         pr_default.close(48);
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A16MateriaNombre = "" ;
         }
         isValidOutput.Add((Object)(StringUtil.RTrim( A16MateriaNombre)));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
      }

      public void Valid_Alumnoid( short GX_Parm1 ,
                                  String GX_Parm2 ,
                                  String GX_Parm3 ,
                                  String GX_Parm4 )
      {
         A1AlumnoId = GX_Parm1 ;
         A2AlumnoNombre = GX_Parm2 ;
         A3AlumnoApellidos = GX_Parm3 ;
         A4AlumnoNombreCompleto = GX_Parm4 ;
         /* Using cursor T000452 */
         pr_default.execute(46, new Object[] {A1AlumnoId});
         if ( (pr_default.getStatus(46) == 101) )
         {
            GX_msglist.addItem("No existe 'Alumno'.", "ForeignKeyNotFound", 1, "ALUMNOID");
            AnyError = 1 ;
            GX_FocusControl = edtAlumnoId_Internalname ;
         }
         if ( AnyError == 0 )
         {
            A2AlumnoNombre = T000452_A2AlumnoNombre[0] ;
            A3AlumnoApellidos = T000452_A3AlumnoApellidos[0] ;
         }
         pr_default.close(46);
         A4AlumnoNombreCompleto = A2AlumnoNombre + " " + A3AlumnoApellidos ;
         dynload_actions( ) ;
         if ( AnyError == 1 )
         {
            A2AlumnoNombre = "" ;
            A3AlumnoApellidos = "" ;
         }
         isValidOutput.Add((Object)(StringUtil.RTrim( A2AlumnoNombre)));
         isValidOutput.Add((Object)(StringUtil.RTrim( A3AlumnoApellidos)));
         isValidOutput.Add((Object)(StringUtil.RTrim( A4AlumnoNombreCompleto)));
         isValidOutput.Add((Object)(context.GX_msglist.ToJavascriptSource()));
         context.GX_webresponse.AddString(isValidOutput.ToJSonString());
      }

      protected void cleanup( )
      {
         flushBuffer();
         CloseOpenCursors();
         if ( IsMain )
         {
            context.CloseConnections() ;
         }
      }

      protected void CloseOpenCursors( )
      {
         pr_default.close(47);
         pr_default.close(46);
         pr_default.close(40);
         pr_default.close(48);
         pr_default.close(39);
         pr_default.close(32);
         pr_default.close(31);
         pr_default.close(25);
         pr_default.close(17);
         pr_default.close(16);
         pr_default.close(23);
      }

      public override void initialize( )
      {
         sPrefix = "" ;
         wcpOGx_mode = "" ;
         scmdbuf = "" ;
         gxfirstwebparm = "" ;
         gxfirstwebparm_bkp = "" ;
         PreviousTooltip = "" ;
         PreviousCaption = "" ;
         Form = new GXWebForm();
         GX_FocusControl = "" ;
         sStyleString = "" ;
         ClassString = "" ;
         StyleString = "" ;
         TempTags = "" ;
         bttBtn_enter_Jsonclick = "" ;
         bttBtn_cancel_Jsonclick = "" ;
         bttBtn_delete_Jsonclick = "" ;
         lblTextblockcursoid_Jsonclick = "" ;
         lblTextblockcursonombre_Jsonclick = "" ;
         A26CursoNombre = "" ;
         lblTextblockcursonumeroalumnos_Jsonclick = "" ;
         lblTextblockcursoaula_Jsonclick = "" ;
         A28CursoAula = "" ;
         lblTextblockcursodescripcion_Jsonclick = "" ;
         A29CursoDescripcion = "" ;
         Grid1Container = new GXWebGrid( context);
         Grid1Column = new GXWebColumn();
         A19ProfesorApellidos = "" ;
         A20ProfesorNombre = "" ;
         A21ProfesorNombreCompleto = "" ;
         sMode7 = "" ;
         edtProfesorId_Internalname = "" ;
         edtProfesorApellidos_Internalname = "" ;
         edtProfesorNombre_Internalname = "" ;
         edtProfesorNombreCompleto_Internalname = "" ;
         Gridcurso_alumnosContainer = new GXWebGrid( context);
         Gridcurso_alumnosColumn = new GXWebColumn();
         A2AlumnoNombre = "" ;
         A3AlumnoApellidos = "" ;
         A4AlumnoNombreCompleto = "" ;
         sMode9 = "" ;
         edtAlumnoId_Internalname = "" ;
         edtAlumnoNombre_Internalname = "" ;
         edtAlumnoApellidos_Internalname = "" ;
         edtAlumnoNombreCompleto_Internalname = "" ;
         lblTitlealumnos_Jsonclick = "" ;
         lblTitleprofesores_Jsonclick = "" ;
         imgBtn_first_Jsonclick = "" ;
         imgBtn_first_separator_Jsonclick = "" ;
         imgBtn_previous_Jsonclick = "" ;
         imgBtn_previous_separator_Jsonclick = "" ;
         imgBtn_next_Jsonclick = "" ;
         imgBtn_next_separator_Jsonclick = "" ;
         imgBtn_last_Jsonclick = "" ;
         imgBtn_last_separator_Jsonclick = "" ;
         imgBtn_select_Jsonclick = "" ;
         imgBtn_select_separator_Jsonclick = "" ;
         imgBtn_enter2_Jsonclick = "" ;
         imgBtn_enter2_separator_Jsonclick = "" ;
         imgBtn_cancel2_Jsonclick = "" ;
         imgBtn_cancel2_separator_Jsonclick = "" ;
         imgBtn_delete2_Jsonclick = "" ;
         imgBtn_delete2_separator_Jsonclick = "" ;
         Z26CursoNombre = "" ;
         Z28CursoAula = "" ;
         Z29CursoDescripcion = "" ;
         AV12Pgmname = "" ;
         sMode6 = "" ;
         sEvt = "" ;
         EvtGridId = "" ;
         EvtRowId = "" ;
         sEvtType = "" ;
         edtMateriaId_Internalname = "" ;
         edtMateriaNombre_Internalname = "" ;
         T00046_A27CursoNumeroAlumnos = new short[1] ;
         T00046_n27CursoNumeroAlumnos = new bool[] {false} ;
         A16MateriaNombre = "" ;
         AV10TrnContext = new SdtTransactionContext(context);
         AV11WebSession = new GxWebSession( context);
         T000417_A25CursoId = new short[1] ;
         T000417_A26CursoNombre = new String[] {""} ;
         T000417_A28CursoAula = new String[] {""} ;
         T000417_A29CursoDescripcion = new String[] {""} ;
         T000417_A27CursoNumeroAlumnos = new short[1] ;
         T000417_n27CursoNumeroAlumnos = new bool[] {false} ;
         T000419_A27CursoNumeroAlumnos = new short[1] ;
         T000419_n27CursoNumeroAlumnos = new bool[] {false} ;
         T000420_A25CursoId = new short[1] ;
         T000415_A25CursoId = new short[1] ;
         T000415_A26CursoNombre = new String[] {""} ;
         T000415_A28CursoAula = new String[] {""} ;
         T000415_A29CursoDescripcion = new String[] {""} ;
         T000421_A25CursoId = new short[1] ;
         T000422_A25CursoId = new short[1] ;
         T000423_A25CursoId = new short[1] ;
         T000423_A26CursoNombre = new String[] {""} ;
         T000423_A28CursoAula = new String[] {""} ;
         T000423_A29CursoDescripcion = new String[] {""} ;
         T000425_A25CursoId = new short[1] ;
         T000429_A27CursoNumeroAlumnos = new short[1] ;
         T000429_n27CursoNumeroAlumnos = new bool[] {false} ;
         T000430_A25CursoId = new short[1] ;
         T000430_A18ProfesorId = new short[1] ;
         T000431_A25CursoId = new short[1] ;
         Z19ProfesorApellidos = "" ;
         Z20ProfesorNombre = "" ;
         T000432_A25CursoId = new short[1] ;
         T000432_A19ProfesorApellidos = new String[] {""} ;
         T000432_A20ProfesorNombre = new String[] {""} ;
         T000432_A18ProfesorId = new short[1] ;
         T000413_A19ProfesorApellidos = new String[] {""} ;
         T000413_A20ProfesorNombre = new String[] {""} ;
         T000433_A19ProfesorApellidos = new String[] {""} ;
         T000433_A20ProfesorNombre = new String[] {""} ;
         T000434_A25CursoId = new short[1] ;
         T000434_A18ProfesorId = new short[1] ;
         T000412_A25CursoId = new short[1] ;
         T000412_A18ProfesorId = new short[1] ;
         T000411_A25CursoId = new short[1] ;
         T000411_A18ProfesorId = new short[1] ;
         T000437_A19ProfesorApellidos = new String[] {""} ;
         T000437_A20ProfesorNombre = new String[] {""} ;
         T000438_A25CursoId = new short[1] ;
         T000438_A18ProfesorId = new short[1] ;
         Z16MateriaNombre = "" ;
         T000439_A25CursoId = new short[1] ;
         T000439_A16MateriaNombre = new String[] {""} ;
         T000439_A18ProfesorId = new short[1] ;
         T000439_A15MateriaId = new short[1] ;
         T00049_A16MateriaNombre = new String[] {""} ;
         T000410_A18ProfesorId = new short[1] ;
         T000440_A16MateriaNombre = new String[] {""} ;
         T000441_A18ProfesorId = new short[1] ;
         T000442_A25CursoId = new short[1] ;
         T000442_A18ProfesorId = new short[1] ;
         T000442_A15MateriaId = new short[1] ;
         T00048_A25CursoId = new short[1] ;
         T00048_A18ProfesorId = new short[1] ;
         T00048_A15MateriaId = new short[1] ;
         sMode8 = "" ;
         T00047_A25CursoId = new short[1] ;
         T00047_A18ProfesorId = new short[1] ;
         T00047_A15MateriaId = new short[1] ;
         T000445_A16MateriaNombre = new String[] {""} ;
         T000446_A25CursoId = new short[1] ;
         T000446_A18ProfesorId = new short[1] ;
         T000446_A15MateriaId = new short[1] ;
         Z2AlumnoNombre = "" ;
         Z3AlumnoApellidos = "" ;
         T000447_A25CursoId = new short[1] ;
         T000447_A2AlumnoNombre = new String[] {""} ;
         T000447_A3AlumnoApellidos = new String[] {""} ;
         T000447_A1AlumnoId = new short[1] ;
         T00044_A2AlumnoNombre = new String[] {""} ;
         T00044_A3AlumnoApellidos = new String[] {""} ;
         T000448_A2AlumnoNombre = new String[] {""} ;
         T000448_A3AlumnoApellidos = new String[] {""} ;
         T000449_A25CursoId = new short[1] ;
         T000449_A1AlumnoId = new short[1] ;
         T00043_A25CursoId = new short[1] ;
         T00043_A1AlumnoId = new short[1] ;
         T00042_A25CursoId = new short[1] ;
         T00042_A1AlumnoId = new short[1] ;
         T000452_A2AlumnoNombre = new String[] {""} ;
         T000452_A3AlumnoApellidos = new String[] {""} ;
         T000453_A25CursoId = new short[1] ;
         T000453_A1AlumnoId = new short[1] ;
         lblTextblockprofesorid_Internalname = "" ;
         lblTextblockprofesorapellidos_Internalname = "" ;
         lblTextblockprofesornombre_Internalname = "" ;
         lblTextblockprofesornombrecompleto_Internalname = "" ;
         lblTitlematerias_Internalname = "" ;
         imgprompt_18_Internalname = "" ;
         Grid1Row = new GXWebRow();
         subGrid1_Linesclass = "" ;
         lblTextblockprofesorid_Jsonclick = "" ;
         ROClassString = "" ;
         lblTextblockprofesorapellidos_Jsonclick = "" ;
         lblTextblockprofesornombre_Jsonclick = "" ;
         lblTextblockprofesornombrecompleto_Jsonclick = "" ;
         lblTitlematerias_Jsonclick = "" ;
         Gridcurso_profesores_materiasContainer = new GXWebGrid( context);
         Gridcurso_profesores_materiasColumn = new GXWebColumn();
         GXCCtl = "" ;
         imgprompt_15_Internalname = "" ;
         Gridcurso_profesores_materiasRow = new GXWebRow();
         subGridcurso_profesores_materias_Linesclass = "" ;
         imgprompt_1_Internalname = "" ;
         Gridcurso_alumnosRow = new GXWebRow();
         subGridcurso_alumnos_Linesclass = "" ;
         GXt_char1 = "" ;
         GXt_char2 = "" ;
         sDynURL = "" ;
         FormProcess = "" ;
         GXt_char4 = "" ;
         GXt_char3 = "" ;
         GXt_char5 = "" ;
         isValidOutput = new GxUnknownObjectCollection();
         T000454_A18ProfesorId = new short[1] ;
         pr_default = new DataStoreProvider(context, new GeneXus.Programs.curso__default(),
            new Object[][] {
                new Object[] {
               T00042_A25CursoId, T00042_A1AlumnoId
               }
               , new Object[] {
               T00043_A25CursoId, T00043_A1AlumnoId
               }
               , new Object[] {
               T00044_A2AlumnoNombre, T00044_A3AlumnoApellidos
               }
               , new Object[] {
               T00046_A27CursoNumeroAlumnos, T00046_n27CursoNumeroAlumnos
               }
               , new Object[] {
               T00047_A25CursoId, T00047_A18ProfesorId, T00047_A15MateriaId
               }
               , new Object[] {
               T00048_A25CursoId, T00048_A18ProfesorId, T00048_A15MateriaId
               }
               , new Object[] {
               T00049_A16MateriaNombre
               }
               , new Object[] {
               T000410_A18ProfesorId
               }
               , new Object[] {
               T000411_A25CursoId, T000411_A18ProfesorId
               }
               , new Object[] {
               T000412_A25CursoId, T000412_A18ProfesorId
               }
               , new Object[] {
               T000413_A19ProfesorApellidos, T000413_A20ProfesorNombre
               }
               , new Object[] {
               T000414_A25CursoId, T000414_A26CursoNombre, T000414_A28CursoAula, T000414_A29CursoDescripcion
               }
               , new Object[] {
               T000415_A25CursoId, T000415_A26CursoNombre, T000415_A28CursoAula, T000415_A29CursoDescripcion
               }
               , new Object[] {
               T000417_A25CursoId, T000417_A26CursoNombre, T000417_A28CursoAula, T000417_A29CursoDescripcion, T000417_A27CursoNumeroAlumnos, T000417_n27CursoNumeroAlumnos
               }
               , new Object[] {
               T000419_A27CursoNumeroAlumnos, T000419_n27CursoNumeroAlumnos
               }
               , new Object[] {
               T000420_A25CursoId
               }
               , new Object[] {
               T000421_A25CursoId
               }
               , new Object[] {
               T000422_A25CursoId
               }
               , new Object[] {
               T000423_A25CursoId, T000423_A26CursoNombre, T000423_A28CursoAula, T000423_A29CursoDescripcion
               }
               , new Object[] {
               }
               , new Object[] {
               T000425_A25CursoId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000429_A27CursoNumeroAlumnos, T000429_n27CursoNumeroAlumnos
               }
               , new Object[] {
               T000430_A25CursoId, T000430_A18ProfesorId
               }
               , new Object[] {
               T000431_A25CursoId
               }
               , new Object[] {
               T000432_A25CursoId, T000432_A19ProfesorApellidos, T000432_A20ProfesorNombre, T000432_A18ProfesorId
               }
               , new Object[] {
               T000433_A19ProfesorApellidos, T000433_A20ProfesorNombre
               }
               , new Object[] {
               T000434_A25CursoId, T000434_A18ProfesorId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000437_A19ProfesorApellidos, T000437_A20ProfesorNombre
               }
               , new Object[] {
               T000438_A25CursoId, T000438_A18ProfesorId
               }
               , new Object[] {
               T000439_A25CursoId, T000439_A16MateriaNombre, T000439_A18ProfesorId, T000439_A15MateriaId
               }
               , new Object[] {
               T000440_A16MateriaNombre
               }
               , new Object[] {
               T000441_A18ProfesorId
               }
               , new Object[] {
               T000442_A25CursoId, T000442_A18ProfesorId, T000442_A15MateriaId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000445_A16MateriaNombre
               }
               , new Object[] {
               T000446_A25CursoId, T000446_A18ProfesorId, T000446_A15MateriaId
               }
               , new Object[] {
               T000447_A25CursoId, T000447_A2AlumnoNombre, T000447_A3AlumnoApellidos, T000447_A1AlumnoId
               }
               , new Object[] {
               T000448_A2AlumnoNombre, T000448_A3AlumnoApellidos
               }
               , new Object[] {
               T000449_A25CursoId, T000449_A1AlumnoId
               }
               , new Object[] {
               }
               , new Object[] {
               }
               , new Object[] {
               T000452_A2AlumnoNombre, T000452_A3AlumnoApellidos
               }
               , new Object[] {
               T000453_A25CursoId, T000453_A1AlumnoId
               }
               , new Object[] {
               T000454_A18ProfesorId
               }
            }
         );
         AV12Pgmname = "Curso" ;
      }

      private short nIsMod_8 ;
      private short nIsMod_7 ;
      private short nIsMod_9 ;
      private short wcpOAV7CursoId ;
      private short GxWebError ;
      private short A25CursoId ;
      private short A18ProfesorId ;
      private short A15MateriaId ;
      private short A1AlumnoId ;
      private short nRC_Gridcurso_profesores_materias ;
      private short nGXsfl_95_idx=1 ;
      private short nRC_Grid1 ;
      private short nGXsfl_65_idx=1 ;
      private short nRC_Gridcurso_alumnos ;
      private short nGXsfl_104_idx=1 ;
      private short AV7CursoId ;
      private short IsConfirmed ;
      private short IsModified ;
      private short AnyError ;
      private short nKeyPressed ;
      private short initialized ;
      private short A27CursoNumeroAlumnos ;
      private short subGrid1_Backcolorstyle ;
      private short subGrid1_Borderwidth ;
      private short subGrid1_Collapsed ;
      private short nBlankRcdCount7 ;
      private short nRcdExists_7 ;
      private short RcdFound7 ;
      private short nBlankRcdUsr7 ;
      private short subGridcurso_alumnos_Backcolorstyle ;
      private short subGridcurso_alumnos_Collapsed ;
      private short nBlankRcdCount9 ;
      private short nRcdExists_9 ;
      private short RcdFound9 ;
      private short nBlankRcdUsr9 ;
      private short Z25CursoId ;
      private short RcdFound6 ;
      private short nRcdDeleted_9 ;
      private short Z1AlumnoId ;
      private short nRcdDeleted_8 ;
      private short nRcdExists_8 ;
      private short RcdFound8 ;
      private short Z15MateriaId ;
      private short nRcdDeleted_7 ;
      private short Z18ProfesorId ;
      private short GX_JID ;
      private short Z27CursoNumeroAlumnos ;
      private short Gx_BScreen ;
      private short subGrid1_Backstyle ;
      private short subGridcurso_profesores_materias_Backcolorstyle ;
      private short subGridcurso_profesores_materias_Collapsed ;
      private short nBlankRcdCount8 ;
      private short nBlankRcdUsr8 ;
      private short subGridcurso_profesores_materias_Backstyle ;
      private short subGridcurso_alumnos_Backstyle ;
      private short gxajaxcallmode ;
      private int trnEnded ;
      private int bttBtn_enter_Visible ;
      private int bttBtn_cancel_Visible ;
      private int bttBtn_delete_Visible ;
      private int edtCursoId_Enabled ;
      private int edtCursoNombre_Enabled ;
      private int edtCursoNumeroAlumnos_Enabled ;
      private int edtCursoAula_Enabled ;
      private int edtCursoDescripcion_Enabled ;
      private int edtProfesorId_Enabled ;
      private int edtProfesorApellidos_Enabled ;
      private int edtProfesorNombre_Enabled ;
      private int edtProfesorNombreCompleto_Enabled ;
      private int subGrid1_Selectioncolor ;
      private int subGrid1_Hoveringcolor ;
      private int fRowAdded ;
      private int edtAlumnoId_Enabled ;
      private int edtAlumnoNombre_Enabled ;
      private int edtAlumnoApellidos_Enabled ;
      private int edtAlumnoNombreCompleto_Enabled ;
      private int imgBtn_first_Visible ;
      private int imgBtn_first_separator_Visible ;
      private int imgBtn_previous_Visible ;
      private int imgBtn_previous_separator_Visible ;
      private int imgBtn_next_Visible ;
      private int imgBtn_next_separator_Visible ;
      private int imgBtn_last_Visible ;
      private int imgBtn_last_separator_Visible ;
      private int imgBtn_select_Visible ;
      private int imgBtn_select_separator_Visible ;
      private int imgBtn_enter2_Visible ;
      private int imgBtn_enter2_Enabled ;
      private int imgBtn_enter2_separator_Visible ;
      private int imgBtn_cancel2_Visible ;
      private int imgBtn_cancel2_separator_Visible ;
      private int imgBtn_delete2_Visible ;
      private int imgBtn_delete2_Enabled ;
      private int imgBtn_delete2_separator_Visible ;
      private int GRIDCURSO_PROFESORES_MATERIAS_nFirstRecordOnPage ;
      private int GRIDCURSO_ALUMNOS_nFirstRecordOnPage ;
      private int edtMateriaId_Enabled ;
      private int edtMateriaNombre_Enabled ;
      private int subGrid1_Backcolor ;
      private int subGrid1_Allbackcolor ;
      private int imgprompt_18_Visible ;
      private int GRIDCURSO_PROFESORES_MATERIAS_nCurrentRecord ;
      private int subGridcurso_profesores_materias_Backcolor ;
      private int subGridcurso_profesores_materias_Allbackcolor ;
      private int imgprompt_15_Visible ;
      private int subGridcurso_alumnos_Backcolor ;
      private int subGridcurso_alumnos_Allbackcolor ;
      private int imgprompt_1_Visible ;
      private int defedtMateriaId_Enabled ;
      private int defedtAlumnoId_Enabled ;
      private int defedtProfesorId_Enabled ;
      private int idxLst ;
      private String sPrefix ;
      private String sGXsfl_95_idx="0001" ;
      private String sGXsfl_65_idx="0001" ;
      private String sGXsfl_104_idx="0001" ;
      private String wcpOGx_mode ;
      private String scmdbuf ;
      private String gxfirstwebparm ;
      private String gxfirstwebparm_bkp ;
      private String Gx_mode ;
      private String PreviousTooltip ;
      private String PreviousCaption ;
      private String GX_FocusControl ;
      private String edtCursoNombre_Internalname ;
      private String sStyleString ;
      private String tblTablemain_Internalname ;
      private String ClassString ;
      private String StyleString ;
      private String grpGroupdata_Internalname ;
      private String tblTable1_Internalname ;
      private String TempTags ;
      private String bttBtn_enter_Internalname ;
      private String bttBtn_enter_Jsonclick ;
      private String bttBtn_cancel_Internalname ;
      private String bttBtn_cancel_Jsonclick ;
      private String bttBtn_delete_Internalname ;
      private String bttBtn_delete_Jsonclick ;
      private String tblTable2_Internalname ;
      private String lblTextblockcursoid_Internalname ;
      private String lblTextblockcursoid_Jsonclick ;
      private String edtCursoId_Internalname ;
      private String edtCursoId_Jsonclick ;
      private String lblTextblockcursonombre_Internalname ;
      private String lblTextblockcursonombre_Jsonclick ;
      private String edtCursoNombre_Jsonclick ;
      private String lblTextblockcursonumeroalumnos_Internalname ;
      private String lblTextblockcursonumeroalumnos_Jsonclick ;
      private String edtCursoNumeroAlumnos_Internalname ;
      private String edtCursoNumeroAlumnos_Jsonclick ;
      private String lblTextblockcursoaula_Internalname ;
      private String lblTextblockcursoaula_Jsonclick ;
      private String edtCursoAula_Internalname ;
      private String edtCursoAula_Jsonclick ;
      private String lblTextblockcursodescripcion_Internalname ;
      private String lblTextblockcursodescripcion_Jsonclick ;
      private String edtCursoDescripcion_Internalname ;
      private String lblTextblockprofesorid_Caption ;
      private String lblTextblockprofesorapellidos_Caption ;
      private String lblTextblockprofesornombre_Caption ;
      private String lblTextblockprofesornombrecompleto_Caption ;
      private String lblTitlematerias_Caption ;
      private String sMode7 ;
      private String edtProfesorId_Internalname ;
      private String edtProfesorApellidos_Internalname ;
      private String edtProfesorNombre_Internalname ;
      private String edtProfesorNombreCompleto_Internalname ;
      private String imgprompt_15_Link ;
      private String sMode9 ;
      private String edtAlumnoId_Internalname ;
      private String edtAlumnoNombre_Internalname ;
      private String edtAlumnoApellidos_Internalname ;
      private String edtAlumnoNombreCompleto_Internalname ;
      private String tblTable6_Internalname ;
      private String lblTitlealumnos_Internalname ;
      private String lblTitlealumnos_Jsonclick ;
      private String tblTable3_Internalname ;
      private String lblTitleprofesores_Internalname ;
      private String lblTitleprofesores_Jsonclick ;
      private String tblTabletoolbar_Internalname ;
      private String imgBtn_first_Internalname ;
      private String imgBtn_first_Jsonclick ;
      private String imgBtn_first_separator_Internalname ;
      private String imgBtn_first_separator_Jsonclick ;
      private String imgBtn_previous_Internalname ;
      private String imgBtn_previous_Jsonclick ;
      private String imgBtn_previous_separator_Internalname ;
      private String imgBtn_previous_separator_Jsonclick ;
      private String imgBtn_next_Internalname ;
      private String imgBtn_next_Jsonclick ;
      private String imgBtn_next_separator_Internalname ;
      private String imgBtn_next_separator_Jsonclick ;
      private String imgBtn_last_Internalname ;
      private String imgBtn_last_Jsonclick ;
      private String imgBtn_last_separator_Internalname ;
      private String imgBtn_last_separator_Jsonclick ;
      private String imgBtn_select_Internalname ;
      private String imgBtn_select_Jsonclick ;
      private String imgBtn_select_separator_Internalname ;
      private String imgBtn_select_separator_Jsonclick ;
      private String imgBtn_enter2_Internalname ;
      private String imgBtn_enter2_Jsonclick ;
      private String imgBtn_enter2_separator_Internalname ;
      private String imgBtn_enter2_separator_Jsonclick ;
      private String imgBtn_cancel2_Internalname ;
      private String imgBtn_cancel2_Jsonclick ;
      private String imgBtn_cancel2_separator_Internalname ;
      private String imgBtn_cancel2_separator_Jsonclick ;
      private String imgBtn_delete2_Internalname ;
      private String imgBtn_delete2_Jsonclick ;
      private String imgBtn_delete2_separator_Internalname ;
      private String imgBtn_delete2_separator_Jsonclick ;
      private String AV12Pgmname ;
      private String sMode6 ;
      private String sEvt ;
      private String EvtGridId ;
      private String EvtRowId ;
      private String sEvtType ;
      private String edtMateriaId_Internalname ;
      private String edtMateriaNombre_Internalname ;
      private String sMode8 ;
      private String lblTextblockprofesorid_Internalname ;
      private String lblTextblockprofesorapellidos_Internalname ;
      private String lblTextblockprofesornombre_Internalname ;
      private String lblTextblockprofesornombrecompleto_Internalname ;
      private String lblTitlematerias_Internalname ;
      private String imgprompt_18_Internalname ;
      private String subGridcurso_profesores_materias_Internalname ;
      private String subGrid1_Class ;
      private String subGrid1_Linesclass ;
      private String imgprompt_18_Link ;
      private String tblTable4_Internalname ;
      private String lblTextblockprofesorid_Jsonclick ;
      private String ROClassString ;
      private String edtProfesorId_Jsonclick ;
      private String lblTextblockprofesorapellidos_Jsonclick ;
      private String edtProfesorApellidos_Jsonclick ;
      private String lblTextblockprofesornombre_Jsonclick ;
      private String edtProfesorNombre_Jsonclick ;
      private String lblTextblockprofesornombrecompleto_Jsonclick ;
      private String tblTable5_Internalname ;
      private String lblTitlematerias_Jsonclick ;
      private String GXCCtl ;
      private String imgprompt_15_Internalname ;
      private String subGridcurso_profesores_materias_Class ;
      private String subGridcurso_profesores_materias_Linesclass ;
      private String edtMateriaId_Jsonclick ;
      private String edtMateriaNombre_Jsonclick ;
      private String imgprompt_1_Internalname ;
      private String subGridcurso_alumnos_Class ;
      private String subGridcurso_alumnos_Linesclass ;
      private String imgprompt_1_Link ;
      private String edtAlumnoId_Jsonclick ;
      private String edtAlumnoNombre_Jsonclick ;
      private String edtAlumnoApellidos_Jsonclick ;
      private String edtAlumnoNombreCompleto_Jsonclick ;
      private String GXt_char1 ;
      private String GXt_char2 ;
      private String sDynURL ;
      private String FormProcess ;
      private String GXt_char4 ;
      private String GXt_char3 ;
      private String subGrid1_Internalname ;
      private String subGridcurso_alumnos_Internalname ;
      private String GXt_char5 ;
      private bool entryPointCalled ;
      private bool wbErr ;
      private bool n27CursoNumeroAlumnos ;
      private bool AV9IsAuthorized ;
      private bool returnInSub ;
      private String A26CursoNombre ;
      private String A28CursoAula ;
      private String A29CursoDescripcion ;
      private String A19ProfesorApellidos ;
      private String A20ProfesorNombre ;
      private String A21ProfesorNombreCompleto ;
      private String A2AlumnoNombre ;
      private String A3AlumnoApellidos ;
      private String A4AlumnoNombreCompleto ;
      private String Z26CursoNombre ;
      private String Z28CursoAula ;
      private String Z29CursoDescripcion ;
      private String A16MateriaNombre ;
      private String Z19ProfesorApellidos ;
      private String Z20ProfesorNombre ;
      private String Z16MateriaNombre ;
      private String Z2AlumnoNombre ;
      private String Z3AlumnoApellidos ;
      private GxWebSession AV11WebSession ;
      private GxUnknownObjectCollection isValidOutput ;
      private GXMasterPage MasterPageObj ;
      private GXWebGrid Grid1Container ;
      private GXWebGrid Gridcurso_alumnosContainer ;
      private GXWebGrid Gridcurso_profesores_materiasContainer ;
      private GXWebRow Grid1Row ;
      private GXWebRow Gridcurso_profesores_materiasRow ;
      private GXWebRow Gridcurso_alumnosRow ;
      private GXWebColumn Grid1Column ;
      private GXWebColumn Gridcurso_alumnosColumn ;
      private GXWebColumn Gridcurso_profesores_materiasColumn ;
      private IGxDataStore dsDefault ;
      private IDataStoreProvider pr_default ;
      private short[] T00046_A27CursoNumeroAlumnos ;
      private bool[] T00046_n27CursoNumeroAlumnos ;
      private short[] T000417_A25CursoId ;
      private String[] T000417_A26CursoNombre ;
      private String[] T000417_A28CursoAula ;
      private String[] T000417_A29CursoDescripcion ;
      private short[] T000417_A27CursoNumeroAlumnos ;
      private bool[] T000417_n27CursoNumeroAlumnos ;
      private short[] T000419_A27CursoNumeroAlumnos ;
      private bool[] T000419_n27CursoNumeroAlumnos ;
      private short[] T000420_A25CursoId ;
      private short[] T000415_A25CursoId ;
      private String[] T000415_A26CursoNombre ;
      private String[] T000415_A28CursoAula ;
      private String[] T000415_A29CursoDescripcion ;
      private short[] T000421_A25CursoId ;
      private short[] T000422_A25CursoId ;
      private short[] T000423_A25CursoId ;
      private String[] T000423_A26CursoNombre ;
      private String[] T000423_A28CursoAula ;
      private String[] T000423_A29CursoDescripcion ;
      private short[] T000425_A25CursoId ;
      private short[] T000429_A27CursoNumeroAlumnos ;
      private bool[] T000429_n27CursoNumeroAlumnos ;
      private short[] T000430_A25CursoId ;
      private short[] T000430_A18ProfesorId ;
      private short[] T000431_A25CursoId ;
      private short[] T000432_A25CursoId ;
      private String[] T000432_A19ProfesorApellidos ;
      private String[] T000432_A20ProfesorNombre ;
      private short[] T000432_A18ProfesorId ;
      private String[] T000413_A19ProfesorApellidos ;
      private String[] T000413_A20ProfesorNombre ;
      private String[] T000433_A19ProfesorApellidos ;
      private String[] T000433_A20ProfesorNombre ;
      private short[] T000434_A25CursoId ;
      private short[] T000434_A18ProfesorId ;
      private short[] T000412_A25CursoId ;
      private short[] T000412_A18ProfesorId ;
      private short[] T000411_A25CursoId ;
      private short[] T000411_A18ProfesorId ;
      private String[] T000437_A19ProfesorApellidos ;
      private String[] T000437_A20ProfesorNombre ;
      private short[] T000438_A25CursoId ;
      private short[] T000438_A18ProfesorId ;
      private short[] T000439_A25CursoId ;
      private String[] T000439_A16MateriaNombre ;
      private short[] T000439_A18ProfesorId ;
      private short[] T000439_A15MateriaId ;
      private String[] T00049_A16MateriaNombre ;
      private short[] T000410_A18ProfesorId ;
      private String[] T000440_A16MateriaNombre ;
      private short[] T000441_A18ProfesorId ;
      private short[] T000442_A25CursoId ;
      private short[] T000442_A18ProfesorId ;
      private short[] T000442_A15MateriaId ;
      private short[] T00048_A25CursoId ;
      private short[] T00048_A18ProfesorId ;
      private short[] T00048_A15MateriaId ;
      private short[] T00047_A25CursoId ;
      private short[] T00047_A18ProfesorId ;
      private short[] T00047_A15MateriaId ;
      private String[] T000445_A16MateriaNombre ;
      private short[] T000446_A25CursoId ;
      private short[] T000446_A18ProfesorId ;
      private short[] T000446_A15MateriaId ;
      private short[] T000447_A25CursoId ;
      private String[] T000447_A2AlumnoNombre ;
      private String[] T000447_A3AlumnoApellidos ;
      private short[] T000447_A1AlumnoId ;
      private String[] T00044_A2AlumnoNombre ;
      private String[] T00044_A3AlumnoApellidos ;
      private String[] T000448_A2AlumnoNombre ;
      private String[] T000448_A3AlumnoApellidos ;
      private short[] T000449_A25CursoId ;
      private short[] T000449_A1AlumnoId ;
      private short[] T00043_A25CursoId ;
      private short[] T00043_A1AlumnoId ;
      private short[] T00042_A25CursoId ;
      private short[] T00042_A1AlumnoId ;
      private String[] T000452_A2AlumnoNombre ;
      private String[] T000452_A3AlumnoApellidos ;
      private short[] T000453_A25CursoId ;
      private short[] T000453_A1AlumnoId ;
      private short[] T000454_A18ProfesorId ;
      private short[] T000414_A25CursoId ;
      private String[] T000414_A26CursoNombre ;
      private String[] T000414_A28CursoAula ;
      private String[] T000414_A29CursoDescripcion ;
      private GXWebForm Form ;
      private SdtTransactionContext AV10TrnContext ;
   }

   public class curso__default : DataStoreHelperBase, IDataStoreHelper
   {
      public ICursor[] getCursors( )
      {
         cursorDefinitions();
         return new Cursor[] {
          new ForEachCursor(def[0])
         ,new ForEachCursor(def[1])
         ,new ForEachCursor(def[2])
         ,new ForEachCursor(def[3])
         ,new ForEachCursor(def[4])
         ,new ForEachCursor(def[5])
         ,new ForEachCursor(def[6])
         ,new ForEachCursor(def[7])
         ,new ForEachCursor(def[8])
         ,new ForEachCursor(def[9])
         ,new ForEachCursor(def[10])
         ,new ForEachCursor(def[11])
         ,new ForEachCursor(def[12])
         ,new ForEachCursor(def[13])
         ,new ForEachCursor(def[14])
         ,new ForEachCursor(def[15])
         ,new ForEachCursor(def[16])
         ,new ForEachCursor(def[17])
         ,new ForEachCursor(def[18])
         ,new UpdateCursor(def[19])
         ,new ForEachCursor(def[20])
         ,new UpdateCursor(def[21])
         ,new UpdateCursor(def[22])
         ,new ForEachCursor(def[23])
         ,new ForEachCursor(def[24])
         ,new ForEachCursor(def[25])
         ,new ForEachCursor(def[26])
         ,new ForEachCursor(def[27])
         ,new ForEachCursor(def[28])
         ,new UpdateCursor(def[29])
         ,new UpdateCursor(def[30])
         ,new ForEachCursor(def[31])
         ,new ForEachCursor(def[32])
         ,new ForEachCursor(def[33])
         ,new ForEachCursor(def[34])
         ,new ForEachCursor(def[35])
         ,new ForEachCursor(def[36])
         ,new UpdateCursor(def[37])
         ,new UpdateCursor(def[38])
         ,new ForEachCursor(def[39])
         ,new ForEachCursor(def[40])
         ,new ForEachCursor(def[41])
         ,new ForEachCursor(def[42])
         ,new ForEachCursor(def[43])
         ,new UpdateCursor(def[44])
         ,new UpdateCursor(def[45])
         ,new ForEachCursor(def[46])
         ,new ForEachCursor(def[47])
         ,new ForEachCursor(def[48])
       };
    }

    private static CursorDef[] def;
    private void cursorDefinitions( )
    {
       if ( def == null )
       {
          Object[] prmT000414 ;
          prmT000414 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000417 ;
          prmT000417 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00046 ;
          prmT00046 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000419 ;
          prmT000419 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000420 ;
          prmT000420 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000415 ;
          prmT000415 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000421 ;
          prmT000421 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000422 ;
          prmT000422 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000423 ;
          prmT000423 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000424 ;
          prmT000424 = new Object[] {
          new Object[] {"@CursoNombre",SqlDbType.VarChar,5,0} ,
          new Object[] {"@CursoAula",SqlDbType.VarChar,20,0} ,
          new Object[] {"@CursoDescripcion",SqlDbType.VarChar,650,0}
          } ;
          Object[] prmT000425 ;
          prmT000425 = new Object[] {
          } ;
          Object[] prmT000426 ;
          prmT000426 = new Object[] {
          new Object[] {"@CursoNombre",SqlDbType.VarChar,5,0} ,
          new Object[] {"@CursoAula",SqlDbType.VarChar,20,0} ,
          new Object[] {"@CursoDescripcion",SqlDbType.VarChar,650,0} ,
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000427 ;
          prmT000427 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000430 ;
          prmT000430 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000431 ;
          prmT000431 = new Object[] {
          } ;
          Object[] prmT000432 ;
          prmT000432 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000413 ;
          prmT000413 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000433 ;
          prmT000433 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000434 ;
          prmT000434 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000412 ;
          prmT000412 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000411 ;
          prmT000411 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000435 ;
          prmT000435 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000436 ;
          prmT000436 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000438 ;
          prmT000438 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000439 ;
          prmT000439 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00049 ;
          prmT00049 = new Object[] {
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000410 ;
          prmT000410 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000440 ;
          prmT000440 = new Object[] {
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000441 ;
          prmT000441 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000442 ;
          prmT000442 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00048 ;
          prmT00048 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00047 ;
          prmT00047 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000443 ;
          prmT000443 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000444 ;
          prmT000444 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000446 ;
          prmT000446 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000447 ;
          prmT000447 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00044 ;
          prmT00044 = new Object[] {
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000448 ;
          prmT000448 = new Object[] {
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000449 ;
          prmT000449 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00043 ;
          prmT00043 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT00042 ;
          prmT00042 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000450 ;
          prmT000450 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000451 ;
          prmT000451 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000453 ;
          prmT000453 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000429 ;
          prmT000429 = new Object[] {
          new Object[] {"@CursoId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000437 ;
          prmT000437 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000445 ;
          prmT000445 = new Object[] {
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000454 ;
          prmT000454 = new Object[] {
          new Object[] {"@ProfesorId",SqlDbType.SmallInt,4,0} ,
          new Object[] {"@MateriaId",SqlDbType.SmallInt,4,0}
          } ;
          Object[] prmT000452 ;
          prmT000452 = new Object[] {
          new Object[] {"@AlumnoId",SqlDbType.SmallInt,4,0}
          } ;
          def= new CursorDef[] {
              new CursorDef("T00042", "SELECT [CursoId], [AlumnoId] FROM [CursoAlumnos] WITH (UPDLOCK) WHERE [CursoId] = @CursoId AND [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00042,1,0,true,false )
             ,new CursorDef("T00043", "SELECT [CursoId], [AlumnoId] FROM [CursoAlumnos] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00043,1,0,true,false )
             ,new CursorDef("T00044", "SELECT [AlumnoNombre], [AlumnoApellidos] FROM [Alumno] WITH (NOLOCK) WHERE [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00044,1,0,true,false )
             ,new CursorDef("T00046", "SELECT COALESCE( T1.[CursoNumeroAlumnos], 0) AS CursoNumeroAlumnos FROM (SELECT COUNT(*) AS CursoNumeroAlumnos, [CursoId] FROM [CursoAlumnos] WITH (UPDLOCK) GROUP BY [CursoId] ) T1 WHERE T1.[CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00046,1,0,true,false )
             ,new CursorDef("T00047", "SELECT [CursoId], [ProfesorId], [MateriaId] FROM [CursoProfesoresMaterias] WITH (UPDLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00047,1,0,true,false )
             ,new CursorDef("T00048", "SELECT [CursoId], [ProfesorId], [MateriaId] FROM [CursoProfesoresMaterias] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00048,1,0,true,false )
             ,new CursorDef("T00049", "SELECT [MateriaNombre] FROM [Materia] WITH (NOLOCK) WHERE [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT00049,1,0,true,false )
             ,new CursorDef("T000410", "SELECT [ProfesorId] FROM [ProfesorImparte] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000410,1,0,true,false )
             ,new CursorDef("T000411", "SELECT [CursoId], [ProfesorId] FROM [CursoProfesores] WITH (UPDLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000411,1,0,true,false )
             ,new CursorDef("T000412", "SELECT [CursoId], [ProfesorId] FROM [CursoProfesores] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000412,1,0,true,false )
             ,new CursorDef("T000413", "SELECT [ProfesorApellidos], [ProfesorNombre] FROM [Profesor] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000413,1,0,true,false )
             ,new CursorDef("T000414", "SELECT [CursoId], [CursoNombre], [CursoAula], [CursoDescripcion] FROM [Curso] WITH (UPDLOCK) WHERE [CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000414,1,0,true,false )
             ,new CursorDef("T000415", "SELECT [CursoId], [CursoNombre], [CursoAula], [CursoDescripcion] FROM [Curso] WITH (NOLOCK) WHERE [CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000415,1,0,true,false )
             ,new CursorDef("T000417", "SELECT TM1.[CursoId], TM1.[CursoNombre], TM1.[CursoAula], TM1.[CursoDescripcion], COALESCE( T2.[CursoNumeroAlumnos], 0) AS CursoNumeroAlumnos FROM ([Curso] TM1 WITH (NOLOCK) LEFT JOIN (SELECT COUNT(*) AS CursoNumeroAlumnos, [CursoId] FROM [CursoAlumnos] WITH (NOLOCK) GROUP BY [CursoId] ) T2 ON T2.[CursoId] = TM1.[CursoId]) WHERE TM1.[CursoId] = @CursoId ORDER BY TM1.[CursoId]  OPTION (FAST 100)",true, GxErrorMask.GX_NOMASK, false, this,prmT000417,100,0,true,false )
             ,new CursorDef("T000419", "SELECT COALESCE( T1.[CursoNumeroAlumnos], 0) AS CursoNumeroAlumnos FROM (SELECT COUNT(*) AS CursoNumeroAlumnos, [CursoId] FROM [CursoAlumnos] WITH (UPDLOCK) GROUP BY [CursoId] ) T1 WHERE T1.[CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000419,1,0,true,false )
             ,new CursorDef("T000420", "SELECT [CursoId] FROM [Curso] WITH (NOLOCK) WHERE [CursoId] = @CursoId  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000420,1,0,true,false )
             ,new CursorDef("T000421", "SELECT TOP 1 [CursoId] FROM [Curso] WITH (NOLOCK) WHERE ( [CursoId] > @CursoId) ORDER BY [CursoId]  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000421,1,0,true,true )
             ,new CursorDef("T000422", "SELECT TOP 1 [CursoId] FROM [Curso] WITH (NOLOCK) WHERE ( [CursoId] < @CursoId) ORDER BY [CursoId] DESC  OPTION (FAST 1)",true, GxErrorMask.GX_NOMASK, false, this,prmT000422,1,0,true,true )
             ,new CursorDef("T000423", "SELECT [CursoId], [CursoNombre], [CursoAula], [CursoDescripcion] FROM [Curso] WITH (UPDLOCK) WHERE [CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000423,1,0,true,false )
             ,new CursorDef("T000424", "INSERT INTO [Curso] ([CursoNombre], [CursoAula], [CursoDescripcion]) VALUES (@CursoNombre, @CursoAula, @CursoDescripcion)", GxErrorMask.GX_NOMASK,prmT000424)
             ,new CursorDef("T000425", "SELECT Ident_Current('[Curso]') ",true, GxErrorMask.GX_NOMASK, false, this,prmT000425,1,0,true,false )
             ,new CursorDef("T000426", "UPDATE [Curso] SET [CursoNombre]=@CursoNombre, [CursoAula]=@CursoAula, [CursoDescripcion]=@CursoDescripcion  WHERE [CursoId] = @CursoId", GxErrorMask.GX_NOMASK,prmT000426)
             ,new CursorDef("T000427", "DELETE FROM [Curso]  WHERE [CursoId] = @CursoId", GxErrorMask.GX_NOMASK,prmT000427)
             ,new CursorDef("T000429", "SELECT COALESCE( T1.[CursoNumeroAlumnos], 0) AS CursoNumeroAlumnos FROM (SELECT COUNT(*) AS CursoNumeroAlumnos, [CursoId] FROM [CursoAlumnos] WITH (UPDLOCK) GROUP BY [CursoId] ) T1 WHERE T1.[CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000429,1,0,true,false )
             ,new CursorDef("T000430", "SELECT TOP 1 [CursoId], [ProfesorId] FROM [CursoProfesores] WITH (NOLOCK) WHERE [CursoId] = @CursoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000430,1,0,true,true )
             ,new CursorDef("T000431", "SELECT [CursoId] FROM [Curso] WITH (NOLOCK) ORDER BY [CursoId]  OPTION (FAST 100)",true, GxErrorMask.GX_NOMASK, false, this,prmT000431,100,0,true,false )
             ,new CursorDef("T000432", "SELECT T1.[CursoId], T2.[ProfesorApellidos], T2.[ProfesorNombre], T1.[ProfesorId] FROM ([CursoProfesores] T1 WITH (NOLOCK) INNER JOIN [Profesor] T2 WITH (NOLOCK) ON T2.[ProfesorId] = T1.[ProfesorId]) WHERE T1.[CursoId] = @CursoId and T1.[ProfesorId] = @ProfesorId ORDER BY T1.[CursoId], T1.[ProfesorId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000432,100,0,true,false )
             ,new CursorDef("T000433", "SELECT [ProfesorApellidos], [ProfesorNombre] FROM [Profesor] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000433,1,0,true,false )
             ,new CursorDef("T000434", "SELECT [CursoId], [ProfesorId] FROM [CursoProfesores] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000434,1,0,true,false )
             ,new CursorDef("T000435", "INSERT INTO [CursoProfesores] ([CursoId], [ProfesorId]) VALUES (@CursoId, @ProfesorId)", GxErrorMask.GX_NOMASK,prmT000435)
             ,new CursorDef("T000436", "DELETE FROM [CursoProfesores]  WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId", GxErrorMask.GX_NOMASK,prmT000436)
             ,new CursorDef("T000437", "SELECT [ProfesorApellidos], [ProfesorNombre] FROM [Profesor] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000437,1,0,true,false )
             ,new CursorDef("T000438", "SELECT [CursoId], [ProfesorId] FROM [CursoProfesores] WITH (NOLOCK) WHERE [CursoId] = @CursoId ORDER BY [CursoId], [ProfesorId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000438,100,0,true,false )
             ,new CursorDef("T000439", "SELECT T1.[CursoId], T2.[MateriaNombre], T1.[ProfesorId], T1.[MateriaId] FROM ([CursoProfesoresMaterias] T1 WITH (NOLOCK) INNER JOIN [Materia] T2 WITH (NOLOCK) ON T2.[MateriaId] = T1.[MateriaId]) WHERE T1.[CursoId] = @CursoId and T1.[ProfesorId] = @ProfesorId and T1.[MateriaId] = @MateriaId ORDER BY T1.[CursoId], T1.[ProfesorId], T1.[MateriaId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000439,11,0,true,false )
             ,new CursorDef("T000440", "SELECT [MateriaNombre] FROM [Materia] WITH (NOLOCK) WHERE [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000440,1,0,true,false )
             ,new CursorDef("T000441", "SELECT [ProfesorId] FROM [ProfesorImparte] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000441,1,0,true,false )
             ,new CursorDef("T000442", "SELECT [CursoId], [ProfesorId], [MateriaId] FROM [CursoProfesoresMaterias] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000442,1,0,true,false )
             ,new CursorDef("T000443", "INSERT INTO [CursoProfesoresMaterias] ([CursoId], [ProfesorId], [MateriaId]) VALUES (@CursoId, @ProfesorId, @MateriaId)", GxErrorMask.GX_NOMASK,prmT000443)
             ,new CursorDef("T000444", "DELETE FROM [CursoProfesoresMaterias]  WHERE [CursoId] = @CursoId AND [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId", GxErrorMask.GX_NOMASK,prmT000444)
             ,new CursorDef("T000445", "SELECT [MateriaNombre] FROM [Materia] WITH (NOLOCK) WHERE [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000445,1,0,true,false )
             ,new CursorDef("T000446", "SELECT [CursoId], [ProfesorId], [MateriaId] FROM [CursoProfesoresMaterias] WITH (NOLOCK) WHERE [CursoId] = @CursoId and [ProfesorId] = @ProfesorId ORDER BY [CursoId], [ProfesorId], [MateriaId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000446,11,0,true,false )
             ,new CursorDef("T000447", "SELECT T1.[CursoId], T2.[AlumnoNombre], T2.[AlumnoApellidos], T1.[AlumnoId] FROM ([CursoAlumnos] T1 WITH (NOLOCK) INNER JOIN [Alumno] T2 WITH (NOLOCK) ON T2.[AlumnoId] = T1.[AlumnoId]) WHERE T1.[CursoId] = @CursoId and T1.[AlumnoId] = @AlumnoId ORDER BY T1.[CursoId], T1.[AlumnoId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000447,11,0,true,false )
             ,new CursorDef("T000448", "SELECT [AlumnoNombre], [AlumnoApellidos] FROM [Alumno] WITH (NOLOCK) WHERE [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000448,1,0,true,false )
             ,new CursorDef("T000449", "SELECT [CursoId], [AlumnoId] FROM [CursoAlumnos] WITH (NOLOCK) WHERE [CursoId] = @CursoId AND [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000449,1,0,true,false )
             ,new CursorDef("T000450", "INSERT INTO [CursoAlumnos] ([CursoId], [AlumnoId]) VALUES (@CursoId, @AlumnoId)", GxErrorMask.GX_NOMASK,prmT000450)
             ,new CursorDef("T000451", "DELETE FROM [CursoAlumnos]  WHERE [CursoId] = @CursoId AND [AlumnoId] = @AlumnoId", GxErrorMask.GX_NOMASK,prmT000451)
             ,new CursorDef("T000452", "SELECT [AlumnoNombre], [AlumnoApellidos] FROM [Alumno] WITH (NOLOCK) WHERE [AlumnoId] = @AlumnoId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000452,1,0,true,false )
             ,new CursorDef("T000453", "SELECT [CursoId], [AlumnoId] FROM [CursoAlumnos] WITH (NOLOCK) WHERE [CursoId] = @CursoId ORDER BY [CursoId], [AlumnoId] ",true, GxErrorMask.GX_NOMASK, false, this,prmT000453,11,0,true,false )
             ,new CursorDef("T000454", "SELECT [ProfesorId] FROM [ProfesorImparte] WITH (NOLOCK) WHERE [ProfesorId] = @ProfesorId AND [MateriaId] = @MateriaId ",true, GxErrorMask.GX_NOMASK, false, this,prmT000454,1,0,true,false )
          };
       }
    }

    public void getResults( int cursor ,
                            IFieldGetter rslt ,
                            Object[] buf )
    {
       switch ( cursor )
       {
             case 0 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 1 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 2 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 3 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 4 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 5 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 6 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                break;
             case 7 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 8 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 9 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 10 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 11 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((String[]) buf[3])[0] = rslt.getVarchar(4) ;
                break;
             case 12 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((String[]) buf[3])[0] = rslt.getVarchar(4) ;
                break;
             case 13 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((String[]) buf[3])[0] = rslt.getVarchar(4) ;
                ((short[]) buf[4])[0] = rslt.getShort(5) ;
                ((bool[]) buf[5])[0] = rslt.wasNull(5);
                break;
             case 14 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 15 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 16 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 17 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 18 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((String[]) buf[3])[0] = rslt.getVarchar(4) ;
                break;
             case 20 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 23 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((bool[]) buf[1])[0] = rslt.wasNull(1);
                break;
             case 24 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 25 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 26 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                break;
             case 27 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 28 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 31 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 32 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 33 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                break;
             case 34 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                break;
             case 35 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
             case 36 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 39 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                break;
             case 40 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                ((short[]) buf[2])[0] = rslt.getShort(3) ;
                break;
             case 41 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((short[]) buf[3])[0] = rslt.getShort(4) ;
                break;
             case 42 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 43 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 46 :
                ((String[]) buf[0])[0] = rslt.getVarchar(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                break;
             case 47 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((short[]) buf[1])[0] = rslt.getShort(2) ;
                break;
             case 48 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                break;
       }
    }

    public void setParameters( int cursor ,
                               IFieldSetter stmt ,
                               Object[] parms )
    {
       switch ( cursor )
       {
             case 0 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 1 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 2 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 3 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 4 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 5 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 6 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 7 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 8 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 9 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 10 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 11 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 12 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 13 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 14 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 15 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 16 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 17 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 18 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 19 :
                stmt.SetParameter(1, (String)parms[0]);
                stmt.SetParameter(2, (String)parms[1]);
                stmt.SetParameter(3, (String)parms[2]);
                break;
             case 21 :
                stmt.SetParameter(1, (String)parms[0]);
                stmt.SetParameter(2, (String)parms[1]);
                stmt.SetParameter(3, (String)parms[2]);
                stmt.SetParameter(4, (short)parms[3]);
                break;
             case 22 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 23 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 24 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 26 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 27 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 28 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 29 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 30 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 31 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 32 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 33 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 34 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 35 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 36 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 37 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 38 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                stmt.SetParameter(3, (short)parms[2]);
                break;
             case 39 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 40 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 41 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 42 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 43 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 44 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 45 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
             case 46 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 47 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
             case 48 :
                stmt.SetParameter(1, (short)parms[0]);
                stmt.SetParameter(2, (short)parms[1]);
                break;
       }
    }

 }

}
